-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Overlay: Enable overlay compilation for Java #19872
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
Conversation
981ab79
to
2575d8e
Compare
a9f1540
to
64f27e2
Compare
2575d8e
to
57752ca
Compare
7c1acbb
to
b3d61f7
Compare
b3d61f7
to
10a678d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables overlay compilation for Java by adding the compileForOverlayEval: true
configuration to the qlpack.yml file. The overlay compilation feature allows the compiler to model the overlay frontier throughout optimization passes and generate QLX that supports both non-overlay aware and overlay aware evaluation.
Key Changes:
- Enables overlay compilation for Java queries through configuration
- Maintains backward compatibility with non-overlay aware evaluation as default
- Addresses performance regressions identified in DCA experiments
Looks like there's some missing data or something for |
The query produces too much data for DCA to analyse for those projects. For I've seen it in past Java DCA nightly experiments (example). |
Ah! That makes a lot of sense - looking at the query I see that it's a custom path-problem implementation that doesn't prune the graph, which means that the query result gets a huge amount of superfluous graph edges. I should probably just fix that. |
I'd say dca looks pretty good then - there's one potential regression in |
I ran the full nightly query suite on Most expensive predicates without overlay compilation for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like we're ready to merge, then!
This PR enables overlay compilation for Java. With overlay compilation enabled, the compiler will model the overlay frontier throughout optimisation passes and generate QLX that supports both non-overlay aware evaluation and overlay aware evaluation. The current non-overlay aware evaluation will remain the default. Enabling overlay compilation will not affect semantics under non-overlay aware evaluation, but may affect performance as some previously valid optimisations are no longer valid under overlay compilation.
Previous DCA experiments identified two real regressions stemming from TC bounds and magic bounds that were hampered by the overlay frontier. The TC bound regressions both involved use of
DataFlow::localExprFlow
and affected 2 queries. The TC bound regressions were fixed client-side by marking the callersoverlay[local?]
. The magic bounds issue affected all 11 queries that useRefType.getAStrictAncestor
. The magic bounds issue was fixed callee-side by markinggetAStrictAncestor
overlay[caller?]
, in case any custom queries similarly rely on magic bounds for proper performance ofgetAStrictAncestor
.With the fixes above, DCA experiments shows an overall regression below 0.6%.
apache/commons-*
sources show large variability ranging from 25% regressions to 25% improvements. Note that the two latest DCA experiments are equivalent, except with base and variant swapped for the-rev
experiment.DIL size increases are expected, due to the additional HOPs to model the overlay frontier, discard predicates and helpers that can't get inlined across the overlay frontier.