blurymind / YarnClassic

A tool for writing interactive dialogue in games!
MIT License
518 stars 51 forks source link

try to improve PWA load time #318

Open blurymind opened 1 year ago

blurymind commented 1 year ago

It looks like it is not caching some stuff, resulting in a long load time on mobile.

Possibly the new wasm inkjs parser

blurymind commented 1 year ago

Alot of it is lost in bundled js from deps/external libs

also noticed pwa is not breaking cache after updates properly

should be fixed as https://github.com/blurymind/YarnClassic/issues/319

blurymind commented 1 year ago

another factor is file loading from cache time - with bigger files, the app can take a while to restore its previous status from cache

blurymind commented 7 months ago

removed some dependencies 36ae01fa6b0c019c52f8b4f0d7842a167111881a 428fa6d8a2456b5e59dcdcacbeee50fcb631a1ae 986b91f7c144eefcf55d51aba54d2209e8aa3bec edbd3c5e764cfb94e6693b68eee3b5a5de1c9589

removed giant wasm blob for the ink file parser. This is handled by inkjs now 447d3152209273042e1f4aa55e9f335e608a4c8a

removed dict files. They are fetched and cached now instead- and dont block app loading 608cbef5f5715581a0fccef93aabd5dcf97fa1d2

sped up loading of giant files and added some debouncing 2f76af987d3df9df11156e483cd1fc4d4b4a0747 e372f56cc49eeb2a754513f5d2309489c2a60819 84ff58a91ae7072285ed12cf1a2fdade99920b47

app state persistence is now handled by a database instead of localStorage 5d3cf8ef4001748de71fe5d6c286481cb380bc83

the file i/o now is handled using the file system access api c7694e2b05617c6cbe2078600c21c2ee169fa667 so now you can override an opened/already saved file with ctrl+s or the save button

yarn's plugin api now has the ability to load plugins from a gist file bd5e53ade40fe6fac5842e0a7f59756b7733b187 c8bec688ebfc9fb1d7e99f6284125e489c136345

blurymind commented 7 months ago

It passes as a pwa and is not in the red, but there is still alot to be improved image