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

Flamegraph appears to be O(N^2) in complexity. #9

Open
MatthewKhouzam opened this issue Feb 28, 2024 · 2 comments
Open

Flamegraph appears to be O(N^2) in complexity. #9

MatthewKhouzam opened this issue Feb 28, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MatthewKhouzam
Copy link
Contributor

The Incubator Flamegraph appears to be O(N2) in terms of complexity. Simple profiling showed the getNextFunction in callstack.java to be called over 4b times for a 5M event trace.

Potential solutions:

  • Do away with the querySingleState and replace it with a query2d and a cache.
  • Fix the algorithm to return to O(N)
  • Both!
@MatthewKhouzam MatthewKhouzam added bug Something isn't working help wanted Extra attention is needed labels Feb 28, 2024
@bhufmann
Copy link
Contributor

Thanks for issue. Shouldn't be this issue be in the mainline eclipse-tracecompass after it was mainlined there?

@MatthewKhouzam
Copy link
Contributor Author

I suspect it will. I wanted to investigate the issue before posting in main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants