mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-25 16:37:32 +00:00
Deciding whether a preview needs the motion-path plugin read every script file the page loads, once per script tag, all at once, and kept reading after the check gave up. A page naming one file in thousands of script tags started thousands of reads and froze the server. The check now answers "preload the plugin" at once for a page with more than 64 script tags, reads each script file once, keeps at most 8 reads in flight, starts none after its time is up or once a script names a path, and cancels the reads still running when it ends.