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

Try some changes to see whether HTML report performance gets better #1778

Closed
wants to merge 1 commit into from

Conversation

devdanzin
Copy link
Contributor

TL;DR: I couldn't improve HTML report performance, only submitting a PR to record investigations somewhere.

HTML reports are lagging noticeably for sorting and page load with long lists of functions.

I've done my best to investigate but couldn't find anything that actually improved the situation. The changes in this PR seemed like good ideas:

  • Batching DOM updates.
  • Simplifying getCellValue to the code that actually runs (maybe the deleted code is necessary for other browsers?).
  • Only filter rows on page load if we have a saved filter value.
  • Some micro optimizations of dubious value.

I can't detect any improvements to performance from these.

But I'm also fairly sure now that we aren't doing something too obviously wrong, like quadratic loops or firing expensive events too frequently. It seems to be something related to DOM and JS performance, above my competence level.

The Chrome developer tools sometimes pops up [Violation] Forced reflow while executing JavaScript took XXms, but I couldn't get rid of the reflow by reordering attribute accesses.

Maybe we can record sort order and use it instead of sorting every time, but even that isn't a clear win AFAICS.

@nedbat
Copy link
Owner

nedbat commented May 8, 2024

Thanks for trying a bunch of things. We can live with it as it is unless someone else finds an improvement.

@nedbat nedbat closed this May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants