Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Site gets really slow after a few dispatches to the store #18

Closed
dchacke opened this issue Sep 30, 2016 · 2 comments
Closed

Site gets really slow after a few dispatches to the store #18

dchacke opened this issue Sep 30, 2016 · 2 comments

Comments

@dchacke
Copy link

dchacke commented Sep 30, 2016

When I import the monitor, my site gets really slow after having done about 100 or so dispatches to the store. Basically every interaction with the site (scrolling, clicking on links or buttons, dragging things around, etc) is laggy and doesn't respond until after a few seconds have passed.

This may seem like a lot of dispatches, but I have events coming in to the site through a socket that dispatch to the store about every second or so, so that threshold is reached quickly.

Affected browser: Chrome Version 53.0.2785.116 (64-bit)
Affected OS: OS X El Capitan 10.11.6 (15G31)
Node version: v4.0.0
NPM version: 3.7.3

@MikeRyanDev
Copy link
Member

When instrumenting store you can specify a max age property that tells the instrumentation how many past states to keep. Try setting a number and see if that improves performance for you.

StoreDevtoolsModule.instrumentStore({
  montior: ...,
  maxAge: 10
})

@dchacke
Copy link
Author

dchacke commented Oct 1, 2016

Oh cool, got it. You may want to look into why it gets so long after just 100, but this solves it for me for now.

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants