hyperstack-org / hyperstack-org/hyperstack

Hyperstack hotloader is too slow

未关闭
#414 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
538
派生
41
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。