Skip to content
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

Investigate the resolver for potential performance gains #1185

Closed
volsa opened this issue Mar 28, 2024 · 4 comments
Closed

Investigate the resolver for potential performance gains #1185

volsa opened this issue Mar 28, 2024 · 4 comments

Comments

@volsa
Copy link
Member

volsa commented Mar 28, 2024

In one of our internal projects, plc check spends a good chunk of time in the resolver.
We should at least investigate if there are some potential performance gains.
Screenshot 2024-03-28 at 12 30 29

(Note, this profile was done with --threads 1)

@riederm
Copy link
Collaborator

riederm commented Apr 1, 2024

Not sure if we're hunting a ghost here...

to me it looks like that the long plateau does not reflect the time spent annotating, rather than the time spent waiting for a free thread from the threadpool to annotate (which happens in parallel to annotating). I suspect that what we see here is the behavior of the Par_Iter in rayon, when you only give it 1 thread.
I think we should at least see the TypeAnnotator::visit_unit(...) as well on this stack if it is really work spent in the annotation.

can we maybe have a call or something and look together - I sometimes find it hard to read flamegraphs correctly. maybe we can discuss it together.

@riederm
Copy link
Collaborator

riederm commented Apr 2, 2024

do you still have the profiling file? the other thread would be more interesting

@volsa
Copy link
Member Author

volsa commented Apr 2, 2024

Sadly no but it should be reproducible, might do that tomorrow. I did some further quick (time-based) profiling and got the following results (again with --threads=1). Does this mean the assumption with rayon is incorrect? Do we need to look into visit_statement_control? Anyways, I'll take a closer look at this tomorrow and perhaps ping you if you have time.
Screenshot 2024-04-02 at 17 40 53

@volsa
Copy link
Member Author

volsa commented Apr 3, 2024

Closing this in favor of #1189

@volsa volsa closed this as completed Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants