-
Notifications
You must be signed in to change notification settings - Fork 98
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
Improved findrefs execution speed after it runs the first time #114
Improved findrefs execution speed after it runs the first time #114
Conversation
I realized that this solution is very memory consuming, so I'll update my PR tomorrow with a much less consuming version, and also with improvements on the cache initialization. |
I tested the first version, which works, thanks. Minor comment: I think the whitespace style is inconsistent with the rest of llnode. eg: |
|
Looks good, I'm happy to do a more detailed review once you've pushed your other improvements. |
With those changes, llscan will keep a cache of scanned references and will use this to avoid rescanning the entire heap each time. This will hugely improve performance when executing findrefs multiple times. Important: it will create the entire cache after running findrefs the first time for each type of scan (by reference, by property and by string). Fixes: nodejs#97
8ad392f
to
21d4ce5
Compare
Forgot to mention: it will create the entire cache after running |
@mmarchini - I think you still have a memory leak when the user changes targets. When you clear the maps you remove the pointers they contain not the memory pointed to by those pointers (created by There are also a few compiler warnings introduced by the functions Other than that it all looks good to me and should make life easier when running multiple queries against a dump. |
I think Those compiler warnings are not appearing for me (I'm on Ubuntu 16.04), but I think they're fixed now. |
Merged, sorry for the delay. |
With those changes, llscan will keep a cache of searched references and
will use this cache to avoid rescanning the entire heap each time.
This will improve performance when executing findrefs multiple times.
Fixes: #97