hyperstack-org / hyperstack-org/hyperstack

Hyperstack hotloader is too slow

Open
#414 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
538
Forks
41
PR merge metrics
No merged PRs in 30d

Description

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

![hotloader profiling](https://user-images.githubusercontent.com/3176049/120318906-b29c9080-c2e0-11eb-8de1-d1fe6a88c055.png)

These methods create Regexps each time they are called.
If you keep these regexps in a cache the hotloader should be faster.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.