-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
perf(es/minifier): Make analyzer not call collect_infects_from
recursively
#9924
base: main
Are you sure you want to change the base?
Conversation
|
cc @CPunisher Do you have an idea for better caching? |
The point is to determine an unique id for a function node. Maybe BTW does it handle a node many times? |
@CPunisher Yeap. I wrote about them in #9927. While visiting nodes for usage analysis, it calls |
I see. If it is hard to cache the result, can we avoid repeated analysis? That means we can stop collect_infects_from going deeper since we know we will handle inner nodes later. |
That's ideal, but I'm not sure about the way. I'm still investigating. Expected gain is so big but actually it's just an issue of my skill level. |
c2479cd
to
74393af
Compare
collect_infects_from
collect_infects_from
@CPunisher I think I managed to find something close to not recursively calling them. But I want to ensure that my assumption about usage analyzer, and actual code is correct. |
collect_infects_from
collect_infects_from
recursively
CodSpeed Performance ReportMerging #9924 will degrade performances by 3.64%Comparing Summary
Benchmarks breakdown
|
Description:
We don't need to make time complexity non-linear by recursively visiting the effects of infection. Instead, suppose we stop the infection analyzer when the usage analyzer invokes the infection analyzer. In that case, we will have practically identical analysis results because the points are named using an id, and it points to all the infections that occurred by referencing the id.