Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sync pool support for memory optimization #84

Closed
wants to merge 2 commits into from

Conversation

sumslim
Copy link

@sumslim sumslim commented Sep 23, 2024

Using sync.Pool for cancelFnList can help to optimize memory management by reusing the list between API calls, rather than repeatedly allocating and deallocating it.

Service Creation Frequency: If delete API calls are often, sync.Pool can reduce the cost of list allocation.
Memory Efficiency: Instead of garbage collecting after each use, the pool reuses the same memory, improving performance in high-traffic scenarios.

@coveralls
Copy link

coveralls commented Sep 23, 2024

Pull Request Test Coverage Report for Build 10993915225

Details

  • 9 of 11 (81.82%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.005%) to 84.15%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core/asset/service.go 9 11 81.82%
Totals Coverage Status
Change from base Build 10676380823: -0.005%
Covered Lines: 6918
Relevant Lines: 8221

💛 - Coveralls

@sumslim sumslim changed the title feat: sync pool support for cleaning up cancel func in delete asset f… feat: sync pool support for memory optimization Sep 23, 2024
@sumslim sumslim closed this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants