-
-
Notifications
You must be signed in to change notification settings - Fork 387
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
after updating from 3.12.0 to 3.13.1 build time increase from 1m 14s to over 60m #204
Comments
Did you re-run the build to make sure? Happy hols :) |
Yes. Logs are at https://dev.azure.com/sschoof/espresso/_build/results?buildId=344 |
I'm going to investigate, but can you possibly remove code until we find the offender? |
I am currently have only a smartphone with an ssh connection to a Linux with the code. This reduces my ways to inspect the issue. When I am back at my PC I will give it a try |
Coolsies :) I'll keep investigating, this bug is terrible. |
Can't reproduce on my machine :( will try in a VM |
On a Standard DS2 v2 (2 vcpus, 7 GB memory) Azure VM I can reproduce. I reduced the causing code in https://github.com/StefanSchoof/espresso/blob/terser/func/src/switch/switch.ts a little bit. |
Ok, thanks for reducing the code. I was having trouble with typescript but used your own now. Totally reproduced. |
Do you also compile the test? |
Can you try to make this only go through terser? For example, compile the TS to another file and run terser on that file to see if it still freezes. I was wrong about reproducing it before, I was just hitting #202 and thought I found the issue. |
When I run
it takes forever. When I run
I get a result fast. |
I removed the test file and the problem still occurs |
I replaced the typescript with the js from the typescript compiler. Still occurs |
What's the command you're using @StefanSchoof ? I'm creating a new VM to try and reproduce. Make sure you pass '-mc' after the filename! |
I just start webpack ( |
I've created webpack-contrib/terser-webpack-plugin#48. Can you fill in your details? |
I did it. Thanks for your help, especially since the issue seams not be in terser. |
Regression point 842392e, bisected with terser.js & input.js as test case. |
Sorting through this mess. I'm still at 23325 lines. Next time I'm making you guys make the file smaller :P |
I heard there is a tool named terser to reduce the file size ;) |
Hahahaha :) |
Binary search is a blessing though, this could take days otherwise. |
Had you tried add some logging into 842392e#diff-00fe37b20ddfb9ecc9c492b0725fa2b2R1232 to see which code part loops there at the end? With no knowledge of the code, I think it tries to optimize the then part and then an other thing reverts this and so on. |
I've tried that, that's why I'm reducing the bundle. 105 lines... |
I reduced too much and it turned out I was just not waiting enough time for it to build, but it looks like this is happening when minifying the xpath library you're using. Where can I find the source code? |
I think this is an sub dependency of ms-rest-azure and is located at: https://github.com/yaronn/xpath.js |
Temporarily reverted 842392e, will release a beta version so you can test it. |
Published 3.14.0-beta, can you try it @StefanSchoof ? |
This beta doesn't seem to include the necessary |
My tests are somewhat inconclusive. Running the Try to investigate further... |
Okay, found the cause for this behavior. My project had an dependency to the beta version, but terser-webpack-plugin stayed at the 1.13.1 version. After I forced to use this it webpack works again in under one minute. |
Thanks for informing me @Conduitry I wasn't aware that beta versions became latest on release. |
It's settled then. |
@fabiosantoscode you can set an other tag then latest for an beta release, see https://docs.npmjs.com/cli/publish |
I already did! But next time I'll use that |
Hello, It seems we are facing an issue that looks like this one on CircleCI. I am not sure however which version is affected by the bug and which is not. And it seems related but not 100% sure... The issue is either (1) a timeout (30 minutes, which occurs only in CircleCI) or (2) an error such as:
Not sure that 1 and 2 are related however. Behaviour is not deterministic Disabling terser-webpack-plugin (we use webpack) fixes both issues. Our locked version is terser 3.14. So:
Thank you :) |
ok, so: the webpack-terser-plugin automatically enables parallelism and caching. Disabling both fixes the issue on CircleCI if it helps :). Not sure if it's considered as a bug of terser or circleCI |
@eltonio450 were you seeing exit code > 0 for this |
Also, should add that we see Error: ENOMEM: not enough memory, read
at Object.readSync (fs.js:493:3)
at tryReadSync (fs.js:332:20)
at Object.readFileSync (fs.js:361:19)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
fs.js:114
throw err;
^
Error: EFAULT: bad address in system call argument, read
at Object.readSync (fs.js:493:3)
at tryReadSync (fs.js:332:20)
at Object.readFileSync (fs.js:361:19)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:711:20)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18) |
i am not sure anymore, but the not enough memory seems to be some kind of timeout in our case. Did you try disabling parallelization and caching ? |
Webpack was running 3 build configurations in parallel, each having a terser step. We tried reverting back to uglify and had similar issues, so this is probably not a terser issue specifically. We have switched to running the build configurations in series and this resolved the issue. |
Can this still be reproduced? Reading this PR makes me believe this is a webpack thing (since they got around it by disabling parallelism): magda-io/magda#2233 @evilebottnawi have you fixed this on your end? |
Should be fixed, anyway speedup terser always is good, so if you can increase perf for terser, it will be awesome |
I started a build of my old branch and still seems not to finish: https://dev.azure.com/sschoof/espresso/_build/results?buildId=1350&view=logs&j=dd0cdf81-99cc-5b13-4144-b5aff478827b |
The https://github.com/StefanSchoof/espresso/blob/terser/func/terser.js and https://github.com/StefanSchoof/espresso/blob/terser/func/input.js which can reproduce the problem without any webpack involved are still there |
I downloaded your files using wget and ran the build just fine (both on the latest master and |
Maybe I misunderstood you. The old problem is reproduceable with the old terser version (3.13) and without webpack. It was fixed by reverting 842392e in 3.14: #204 (comment) |
Oh cool :) I thought it was back again, I didn't remember that got fixed with a revert and didn't read enough :) Thanks for letting me know anyway |
Your are welcome. Thank you for terser. |
Bug report or Feature request?
bug
Version (complete output of
terser -V
)3.13.1
Complete CLI command or
minify()
options usedI use terser over webpack. My code is found at https://github.com/StefanSchoof/espresso/tree/terser/func
The code is small (two typescript files; 59 lines and 95 lines for test)
The Build at 3.12.0 works in 1m 14 https://dev.azure.com/sschoof/espresso/_build/results?buildId=341 (click at function job to see log)
The Build at 3.13.0 fails after 54s with a cannot read property start of undefined: https://dev.azure.com/sschoof/espresso/_build/results?buildId=342 (click at function job to see log)
The Build at 3.13.1 got cancelled after 60 minutes. https://dev.azure.com/sschoof/espresso/_build/results?buildId=343 (there are other failing builds with 3.13.1: https://dev.azure.com/sschoof/espresso/_build/results?buildId=331, https://dev.azure.com/sschoof/espresso/_build/results?buildId=326)
The only difference between these are the terser version. (See https://github.com/StefanSchoof/espresso/commits/terser)
terser
inputterser
output or errorExpected result
The text was updated successfully, but these errors were encountered: