C++: Fix performance of bbEntryReachesLocally (1.19)#576
Merged
Conversation
This predicate was fast with the queries and engine from 1.18. With the queries from `master` it got a bad join order in the `UninitializedLocal.ql` query, which made it take 2m34s on Wireshark. This commit decomposes `bbEntryReachesLocally` into two predicates that together take only 4s.
Contributor
|
LGTM, though at this stage I'd definitely like to give it a try before merging... |
geoffw0
approved these changes
Nov 29, 2018
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
I have two wireshark snapshots on my machine. On one of them this speeds it up from 807s to 633s, by making bbEntryReachesLocally disappear from the list of most expensive predicates. The other snapshot apparently hangs around 520s with much less contribution from bbEntryReachesLocally (perhaps it's missing something pathological like a giant test case). In any case this seems to be doing what it promises.
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.
This predicate was fast with the queries and engine from 1.18. With the queries from
masterit got a bad join order in theUninitializedLocal.qlquery, which made it take 2m34s on Wireshark. This commit decomposesbbEntryReachesLocallyinto two predicates that together take only 4s.