Conversation
Before
```
Pipeline standard for ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18@7580bdbj was evaluated in 205 iterations totaling 49106ms (delta sizes total: 1254645).
8014745124 ~4% {1} r1 = AstNodeImpl::Impl::AstNode#22e758cf AND NOT `ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18#prev`(FIRST 1)
822416474 ~0% {2} | JOIN WITH `ElementImpl::Impl::MacroExpansion::getImmediatelyEnclosingMacroInvocation/1#1eb32ecc` ON FIRST 1 OUTPUT Rhs.1, Lhs.0
1254645 ~0% {1} | JOIN WITH `ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18#prev_delta` ON FIRST 1 OUTPUT Lhs.1
return r1
```
After
```
Pipeline standard for ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18@f39b84ka was evaluated in 205 iterations totaling 138ms (delta sizes total: 1254645).
4675568 ~0% {1} r1 = JOIN `ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18#prev_delta` WITH `ElementImpl::Impl::MacroExpansion::getImmediatelyEnclosingMacroInvocation/1#1eb32ecc_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1
4672186 ~0% {1} | JOIN WITH AstNodeImpl::Impl::AstNode#22e758cf ON FIRST 1 OUTPUT Lhs.0
1254645 ~0% {1} | AND NOT `ElementImpl::Impl::MacroExpansion::isFromMacroExpansion/1#69965d18#prev`(FIRST 1)
return r1
```
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the performance of a QL predicate by adding a pragma[only_bind_into] directive to improve query evaluation efficiency. The change reduces execution time from 49106ms to 138ms (a ~355x speedup).
Key Changes:
- Added
pragma[only_bind_into]to the recursive call inisFromMacroExpansionpredicate to optimize the join order
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
geoffw0
approved these changes
Nov 13, 2025
Contributor
geoffw0
left a comment
There was a problem hiding this comment.
LGTM, thanks for fixing. :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
After
DCA looks good.