Skip to content

Fix performance issue when it's not on focus#12

Open
gartz wants to merge 2 commits intodanielbuechele:masterfrom
gartz:fix/performance
Open

Fix performance issue when it's not on focus#12
gartz wants to merge 2 commits intodanielbuechele:masterfrom
gartz:fix/performance

Conversation

@gartz
Copy link
Copy Markdown

@gartz gartz commented Feb 12, 2018

There was a setInterval to check the notifications. The thing is that V8 will reduce the resource usage when the DOM is not on focus, but it will add the interval executions pending to a queue.

When you focus the app again, it will try to clear the queue, since the logic in that interval is "heavy" it will result in a heavy process load for quite a while.

This quick fix replace the setInterval by another in use DOM listener that already check the notifications and then uses a lightweight check to execute the notification.

I've being using this for half a day and even in development mode the performance is way better than production mode.

I really recommend the code merge. :)

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.

1 participant