-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix very laggy Sources tab in DevTools when using "Patch all" in Spacepack #214
Fix very laggy Sources tab in DevTools when using "Patch all" in Spacepack #214
Conversation
…t it does not make the debugger unusably laggy when using "patch all modules" in spacepack
I'm worried about merging something like this because of potential breakage of other things around the ecosystem, but this seems small enough that it's probably fine. |
Definitely aware, but I've been rolling with this patch for a few days now and nothing terrible has happened (besides crash screen which had to be fixed, obviously) |
I think it would just be better to split on the boundary of "Webpack-Module" instead of the first 3 of the module ID. |
How do you mean? The thing that causes the performance issue is the fact that all the modules are in "the same directory" as far as DevTools sees it. So it needs to be keyed somehow. |
It's something we can't truly solve because its an upstream issue we're merely trying to work around. Any and all solutions are not going to be desireable. I guess a better solution would be something close to how most hashed object storage works where it usually splits by the first two into a folder instead of splitting the entire string where it could lead to confusion |
So instead of Webpack-Module-123/12345 you want 123/Webpack-Module-12345? That can be done |
I was under the assumption it was splitting like |
Did the requested changes, should be good now |
The problem: DevTools Sources tab is incredibly laggy
The cause: Using "Patch all" creates hundreds of thousands of modules in one directory which is a lot to render in the sidebar and the list isn't virtualized
The solution: Group patched webpack modules by the first 3 chars of the ID, reducing the amount of rendered files in the sidebar
Also my moonbase disappeared but I reverted my changes and it's still gone so maybe unrelated? I need to test if the crash screen works properly but I can't install Crash Me right now.it was my fault