Skip to content

Conversation

@shilman
Copy link
Member

@shilman shilman commented Jul 21, 2020

Issue: #11618 #11229

What I did

storiesHash is the manager-side version of the story store. Currently it's doing a bunch of unnecessary work merging story parameters up the hierarchy of stories/groups/roots, which can be slow for storybooks with large sets of parameters.

With @ndelangen:

  • Removed parameters for the root node (which we believe is safe)
  • Only propagate viewMode and docsOnly parameters up the tree, as they are used in group nodes

Performance implications

We saw a minor perf improvement on official-storybook. We assume this would be more pronounced for a more parameter-heavy/deeply nested storybook:

  • Before: setStories = 885ms
  • After: setStories = 640ms

How to test

  • CI / updated snapshots
  • Run official-storybook and verify
    • Search
    • Docs-only stories
    • View-mode stories

@shilman shilman added this to the 6.0 milestone Jul 21, 2020
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

LGTM

@shilman shilman merged commit fd511fc into next Jul 21, 2020
@stof stof deleted the 11618-optimize-stories-hash branch May 25, 2022 09:30
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.

4 participants