Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces AnnotationFileParser startup overhead during stub parsing by caching the method list for a given TypeElement, avoiding repeated getEnclosedElements() + ElementFilter.methodsIn(...) calls.
Changes:
- Add an LRU cache mapping
TypeElement -> List<ExecutableElement>for enclosed methods. - Route method lookups and debug printing through the cached
methodsInTypeElement(...)helper.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot Can you measure whether this has any performance benefit compared to CI running on master? |
Agent-Logs-Url: https://github.com/eisop/checker-framework/sessions/8643ad52-d7bb-4bf1-a383-61032aabb8e0 Co-authored-by: wmdietl <6699136+wmdietl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/eisop/checker-framework/sessions/8643ad52-d7bb-4bf1-a383-61032aabb8e0 Co-authored-by: wmdietl <6699136+wmdietl@users.noreply.github.com>
Measured against CI on master: I compared master run 24644042584 (base sha 70671f2) with this PR’s CI run 24699483394 for commit 81e637b. Completed Linux/JDK21 jobs show improvements: cftests-junit 18.75m → 17.35m (-7.5%), cftests-nonjunit 11.47m → 10.95m (-4.5%), typecheck-part1 10.95m → 10.30m (-5.9%). This suggests a real startup-time benefit. Commit: ec48c4c. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This is frequent in stub parsing and was a large startup overhead.