Skip to content

Java: Fix performance issue in type flow library#21987

Draft
hvitved wants to merge 3 commits into
github:mainfrom
hvitved:type-flow-ranking
Draft

Java: Fix performance issue in type flow library#21987
hvitved wants to merge 3 commits into
github:mainfrom
hvitved:type-flow-ranking

Conversation

@hvitved

@hvitved hvitved commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This PR fixes the performance issue reported here.

The issue is that UniversalFlow.qll uses purely location-based ranking, which doesn't work well when many entities have the same location information (as is the case for certain compiler-generated methods in Kotlin). The fix is to add an escape hatch to UniversalFlow.qll (and TypeFlow.qll), which allows for language-specific ranking.

@github-actions github-actions Bot added the Java label Jun 15, 2026
Comment thread java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll Fixed
Comment thread java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll Fixed
Comment thread java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll Fixed
Comment thread shared/typeflow/codeql/typeflow/UniversalFlow.qll
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
Comment thread java/ql/lib/semmle/code/java/dataflow/TypeFlow.qll Outdated
Co-authored-by: Anders Schack-Mulligen <aschackmull@users.noreply.github.com>
@hvitved

hvitved commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author
Rerun has been triggered: 2 restarted 🚀

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants