Don't dispose previous pages in dev mode
See original GitHub issueIn dev mode, when navigating from e.g index page to page B, it will then after a while destroy the index page: Disposing inactive page(s): /
. Why not keeping it in memory, at least as long as there aren’t too many pages built?
Rather than disposing on timeout, it appears better to me to dispose pages when there are too many of them in memory.
This would allow to then have fast client-side transitions (after the first load), which allows to have a feel of these transitions without needing to deploy to prod.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
JFrame.dispose() vs System.exit() - java - Stack Overflow
JFrame.dispose(); causes the JFrame window to be destroyed and cleaned up by the operating system. According to the documentation, ...
Read more >CA2202: Do not dispose objects multiple times - Visual Studio ...
To fix a violation of this rule, change the implementation so that regardless of the code path, Dispose is called only one time...
Read more >Activity state changes - Android Developers
When an app enters multi-window mode, available in Android 7.0 (API level 24)and higher, the system notifies the currently running activity ...
Read more >Simple app state management - Flutter documentation
It also automatically calls dispose() on CartModel when the instance is no longer needed. If you want to provide more than one class,...
Read more >4 Types of Memory Leaks in JavaScript and How to Get Rid Of ...
In this article we will explore common types of memory leaks in client-side JavaScript code. We will also learn how to use the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@kunokdev it’s configurable now in v4 beta https://github.com/zeit/next.js#configuring-the-ondemandentries
“too many pages” is kind a hard to decide. What we can do is to provide an option on asking how many pages to buffer in the memory.
I like that and we can default that to 2.