You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hotloader client is very slow when large js files are generated (hyperstack 1.0.0alpha1.8).
Chrome freezes just after page loading.
With chrome profiler, I can see it stays several seconds in ruby/hyperstack-config/lib/hyperstack/hotloader/stack-trace.js in _findFunctionName and _findSourceMappingURL
These methods create Regexps each time they are called.
If you keep these regexps in a cache the hotloader should be faster.
The text was updated successfully, but these errors were encountered:
The hotloader was made for rails 5. In this version, sprockets created one .js per hyperstack/.rb file.
In rails 6 all files are merged in a single application.debug-.js file.
Every time a function name must be found at a specific line, application.debug-*.js is splitted on \n.
On my projet it does that >300 times.
When a .rb file is changed on disk, it is sent to the browser via websocket and it is compiled by opal with Opal.compile.
Another performance issue is due to the parsing of strings by opal/parser. It is very slow. Some files of my project can take 20 seconds to be compiled. I patched the hotloader in order to compile it server side and send the javascript result to the browser. The same file can be hotloaded in 0.3 seconds.
The hotloader client is very slow when large js files are generated (hyperstack 1.0.0alpha1.8).
Chrome freezes just after page loading.
With chrome profiler, I can see it stays several seconds in ruby/hyperstack-config/lib/hyperstack/hotloader/stack-trace.js in _findFunctionName and _findSourceMappingURL
These methods create Regexps each time they are called.
If you keep these regexps in a cache the hotloader should be faster.
The text was updated successfully, but these errors were encountered: