-
Notifications
You must be signed in to change notification settings - Fork 12k
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
ng serve
with esbuild source maps causing chrome, vscode to be extremely slow
#25012
Comments
@jpike88 Thank for you testing out the new functionality. The vendor source map issues should be corrected in the latest prerelease ( |
The initial long slow load is now fixed. However, there are still big delays when:
|
It also seems like |
Hi @jpike88, I did a problem related to the debugging experience and these are caused because vscode debugger keeps waiting for the terminal output to contain I also noticed that you mentioned that you have
I do not follow what you mean If you are still experiencing performance issues while debugging it would be great if you can provide a minimal reproduction that we can take a look at. |
Disregard the outputpath comment... I've removed the sourceMapPathOverrides comment, but needed to change the webRoot to I'll wait for next release with the above PR, and continue to look. |
So I can collect as much relevant debugging info as possible, can you give me tips and what you'd want me to enable/profile to help you? |
While testing I did a mono repo and I did need to set the Anyhow, if the problem persists after todays release you can try to enable vscode launcher trancing by adding |
Just updated to Trace attached. In the below traces, the Chrome window opened and just froze while loading the PWA, it became unresponsive. There is a fundamentally different way the esbuild output is working here... |
I think I found the issue. The esbuild output seems to be outputting all source maps (including vendor source maps) into an inline base64, appending a huge string to the end of the main.js file. The webpack version provides the source maps as a seperate .js.map file. It's a massive string (55mb). Just trying to deserialize it is breaking almost all the tools I have... I had to use unix commands to decode it successfully. I have sourceMap.vendor as false in the configuration. Solutions:
|
Hi @jpike88, Thanks for getting to the bottom of this.
|
@alan-agius4 I think you may be incorrect about the Vendor source maps point. I've updated to latest version (16.0.0-rc.3). I see that the main.js.map is now served as a seperate file. With esbuild enabled... main.js.map is 41.6MB. See screenshot below... dump.map.js is esbuild, dump2.map.js is webpack. All I did was just remove the Searching for a vendor related function shows it's being included in the esbuild main.js.map |
That is expected since with webpack that module is not in |
This makes esbuild server a no-go for any projects except for ones using a small amount of vendor libraries, anything bigger causes the source map file to bloat and create performance issues for debugging. So I'm basically stuck with the webpack builder... I guess I'll just subscribe to evanw/esbuild#207 and wait. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Command
serve
Is this a regression?
The previous version in which this bug was not present was
n/a, it's new with 16-rc0
Description
I have this configured in my angular.json
Yet it seems that all source maps, even from all my node_modules files are being loaded. this makes firing up a launch from vscode super slow as it tries to parse all the source maps. Chrome and VSCode locks up and CPU spikes for almost 10 seconds, and I'm on an M1 chip. Seems like there's just too much traffic than normal going between them.
Seems like
vendorChunks
option isn't supported, which may be a contributing factor to the problem.When I hit a breakpoint in my code, just hitting 'step over' is very slow for it to happen.
Minimal Reproduction
ng serve with sourcemaps, im guessing problem may be worse with more vendor files but not sure
Exception or Error
No response
Your Environment
The text was updated successfully, but these errors were encountered: