goto / compass

Metadata storage service
https://goto.github.io/compass/
Apache License 2.0
2 stars 0 forks source link

feat: sync pool support for memory optimization #84

Open sumslim opened 2 weeks ago

sumslim commented 2 weeks ago

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 commented 2 weeks ago

Pull Request Test Coverage Report for Build 10993915225

Details


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

💛 - Coveralls