Skip to content

Perf improvements #504

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

Merged
merged 3 commits into from
Jun 5, 2025
Merged

Conversation

adbutterfield
Copy link
Contributor

@adbutterfield adbutterfield commented Jun 3, 2024

Hello! Wondering if you would be open to making some perf improvements that I identified?

Background:
I've been trying to improve performance on a test suite using Storybook test runner on a Github Actions based CI.

What I did:
I ran the test suite locally profiling with Clinic flame. react-docgen-typescript had some very hot blocks in the flame graph that I was able to cool down substantially by caching the results of some functions.

For reference, here's the initial run showing trimFileName.js as the hottest block in the entire profile. (Updated image, I put the wrong one at first...)
Screenshot 2024-06-03 at 11 42 10

Results:
My 33 test suites containing 63 tests in total dropped from ~26 seconds to ~14 seconds.

What I don't know:
If the cache keys I used are safe (could there be name collisions?). If you're interested in this kind of micro optimization for this repo.

Copy link

github-actions bot commented Jun 5, 2025

There was no activity for a long time. The PR will be closed soon.

@github-actions github-actions bot added the stale There is no activity for a long time. label Jun 5, 2025
@pvasek pvasek added enhancement and removed stale There is no activity for a long time. labels Jun 5, 2025
@pvasek pvasek merged commit 69cbd42 into styleguidist:master Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants