jaegertracing/jaeger-ui

[Feature]: Speed up Trace Statistics view calculation

maxgaponov opened this issue · 2 comments

Requirement

I would like to view Statistics for traces with a big amount of spans.

Problem

Currently Trace Statistics view is calculating very slowly which makes it impossible to use for large traces.

Proposal

No response

Open questions

No response

It's because the code uses linear searches all over the place, so the complexity is at least O(n^2) right now, if not worse. The solution is to build a map spanID->span once and use it in all lookups.

Yes, I figured it out. Wrote a fix and it works much faster now. I will create a PR tomorrow.