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 摘要。