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

enhance(svg-tester): capture performance data #2915

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Conversation

marcelgerber
Copy link
Member

So, I was curious about performance metrics of grapher, both loading time and memory usage.

To get an overview, I adapted the SVG Tester with some readouts for time taken and memory usage, and these will then be dumped into the results.csv file.

This is easy to do for time taken for rendering, but what's a bit more tricky is getting an accurate readout of the memory consumption (heap used).
To do this in a somewhat good way, I added a (kind of hacky) --isolate mode that will run all the exports sequentially, and runs each in a fresh process. This takes an awfully long time, but it is actually accurate.

If you're curious about the results we get out of this, the results on my machine I put into a Google Sheet here: https://docs.google.com/spreadsheets/d/1Wzz76EYyOT0vo6uqQVMvvAQh0tOJyxcyJuUFfowpzbA/edit?usp=sharing

@ikesau
Copy link
Member

ikesau commented Nov 8, 2023

Super interesting! I recognize a few of those top slugs as the ones my local bake was freezing on just now when I was testing lightning deploys.

Nice to get some benchmarks on this. Excited to see if we can find any optimizations here.

@danyx23
Copy link
Contributor

danyx23 commented Nov 8, 2023

Very nice work. I'd be almost tempted to throw all the big covid scatter plots out - I doubt that they are still useful for anyone.

Maybe a good topic for Grapher hour after we meet?

Copy link
Contributor

@danyx23 danyx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this. In the future we could think of setting up an analytics datasette instance so that we have an easy place where we can write perf results like this to and generate charts from, but that is all downstream from this change.

@larsyencken larsyencken merged commit ed4f195 into master Nov 21, 2023
20 checks passed
@larsyencken larsyencken deleted the svg-tester-perf branch November 21, 2023 13:17
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.

4 participants