-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Devtools performance/memory usage issue with rapid updates #539
Comments
bbugh
changed the title
Devtools performance/memory usage with rapid updates
Devtools performance/memory usage issue with rapid updates
Jan 22, 2018
If Vuex recording is enabled, the dev tools takes a JSON snapshot of the entire Vuex state and getters each time a mutation is committed. |
You can and probably should stop recording Vuex mutations. @Akryum maybe this can be moved to a WebWorker in the future and limit the size of mutations saved in the log (and do the same for events) |
Let's continue in #546 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
4.0.1
Browser and OS info
Chrome 63.0.3239.132 (Official Build) (64-bit) / macOS Sierra 10.12.6
Steps to reproduce
Using this
timer
state module, have atick
action listener somewhere, and do a bunch of commits every time. (This is for a game currently running at 5 fps)What is expected?
The devtools perform smoothly and don't take up massive amounts of RAM.
What is actually happening?
Shortly after starting the app, the devtools run very slowly. The memory rises until it eventually takes up all available RAM. At some point I have to kill it, causing the extension to crash.
It may be that I'm crazy and experimenting with Vue/Vuex for something it's not intended to be used for (a game with a lot of calculations, aka an incremental game). Maybe Vuex is designed for standard UI with small amount of events and commits? (If this amount of updates is a bad idea, I'd love to know before I sink more time into it.)
Here's how it's working: Every tick (currently 5 ticks per second) an update check is run, and player's resources are incremented based on some math so that they get X per second (using timeDelta). There's currently 5 commits, so 5x5
updateTime
= 26 commits per second. If a player clicks a button, it also does some progress bar math (in a separate state module).Pausing the execution of the app and then scanning through the devtools, I see that there aren't any unexpected commits, and there's almost no math more complicated than
var += 1
going on. The app itself seems to be running perfectly fine performance-wise, but the devtools are choking almost immediately after launching the app. It seems that it can't handle large amounts of frequent commits?Thanks for a really spectacular tool and Vue in general.
The text was updated successfully, but these errors were encountered: