perf(scheduler): reduce allocation churn in hot path#1698
perf(scheduler): reduce allocation churn in hot path#1698kshitizlohia1994 wants to merge 1 commit into
Conversation
- Cache Schedulable() result as a package-level singleton to avoid per-call struct allocation in quota_check.go - Add IsVerbose(int) to SchedulerLogger and guard logNodeSetsPluginResult node-name slice building behind IsVerbose(7) check - Fix logNodeSetsPluginResult to collect node names instead of appending the full NodeSet map Signed-off-by: kshitizlohia1994 <kshitizlohia1994@gmail.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Can you change the description wording so that it will not be "fixes .. " - github will close the issue with this current wording. |
📊 Performance Benchmark ResultsComparing PR (
|
|
Total coverage: 50.0% -> 50.0% (delta 0.00%) Merging this branch will decrease overall coverage
Coverage by fileChanged files (no unit tests)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. |
Description
Part of #1653: reduces allocation churn in the scheduler hot path:
Schedulable()result as a package-level singleton inquota_check.goto avoid a heap allocation on every call (733 MB in the profiled run)IsVerbose(int) booltoSchedulerLoggerinterface and guardlogNodeSetsPluginResultnode-name slice building behindIsVerbose(7), so the slices are never allocated on non-verbose runs (1.33 GB in the profiled run)logNodeSetsPluginResultto collect node names (strings) rather than appending the fullNodeSetmapRelated Issues
Part of #1653
Checklist
Breaking Changes
None
Additional Notes
None