Aurelia CLI app package auto-update slows down

Hi, I have a runnig web application on the Aurelia CLI.

From what Ive read in the documentation , CLI Aurelia always works β€œbundled” and never targets the source files directly. By running the au run -watch command, Aurelia listens for file changes and automatically updates app-bundle.js. Example console output:

Starting 'readProjectConfiguration'... Finished 'readProjectConfiguration' Starting 'processMarkup'... Starting 'processCSS'... Starting 'configureEnvironment'... Finished 'configureEnvironment' Starting 'buildJavaScript'... Finished 'processCSS' Finished 'processMarkup' Finished 'buildJavaScript' Starting 'writeBundles'... Tracing views/references... Writing app-bundle.js... Finished 'writeBundles' Starting 'reload'... Finished 'reload' 

This is cool, but in my case it leads to bad developer experience. When I get to work in the morning, any change I make is easily updated in app.bundle, but after some time, the buildJavaScript process (see console output) takes longer to complete, after a few hours work even up to 30 -40 seconds! For me, working as a developer and experiencing many small changes is very painful.

I tried (and still have) to stop the au run -watch command from time to time and re-run it again, and initially it gets a little better, but after a while the problem reappears.

My question is: will it be a workaround, or in some way speed it up or make it serve directly from the source files, and not bundled, or maybe with some other solution? Could this be due to a memory leak in Aurelia itself?

UPDATE:

From time to time it becomes so slow that it actually crashes. This is what I received today (and others several times) from the console:

 ==== Details ================================================ [1]: _tickCallback(aka _tickDomainCallback) [internal/process/next_tick.js:~108] [pc=000000C928AFCE81](this=000003B0DF48BE31 <a process with map 0000012166110B71>) {... FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 
+5
source share
1 answer

This is a late answer, but for future reference, I find it important to note that since the latest releases of the Aurelia CLI have been fixed, this problem has been fixed.

The performance issue along with some serious stability issues was discussed in detail in GitHub # 293: Error in buildTypeScript: the project cannot be used in two compilations at the same time .

This means that if you upgrade your CLI Aurelia to v0.30 or higher , you will get significantly better performance and stability.

0
source

Source: https://habr.com/ru/post/1260523/


All Articles