eternagame / EternaJS

Eterna game/RNA design interface
Other
12 stars 10 forks source link

Investigating moving from inline sourcemap to external sourcemap #731

Open luxaritas opened 8 months ago

luxaritas commented 8 months ago

The sourcemap is a pretty sizable chunk of the JS file being downloaded. I'm not sure why I opted to use inline sourcemaps, but (namely for performance reasons) we should probably serve sourcemaps separately and allow them to be loaded on demand

luxaritas commented 7 months ago

I was originally thinking "on demand" would be "whenever we run into an error", but most likely/unfortunately that wouldn't be sufficient, given 1) how we currently deploy, the sourcemap for that version of code may no longer be available (as we only keep assets for the current and previous deployed version) and 2) for the PWA, the sourcemap would not be available while offline (assuming an error hasnt been triggered with that code version). That said, we can still defer loading it to not block application load (and even not happen concurrently when loading other assets to speed that up).