AshleighC / neo-dt

2 stars 2 forks source link

Packaged .crx includes git data #1

Open matchu opened 10 years ago

matchu commented 10 years ago

By my count, 33M of the 55M crx file is in .git. That can be safely omitted from future editions of the crx ;)

On that note, I'm interested as to why the themes are packaged with the extension instead of using the remote URLs. Is there some gotcha that's not obvious there?

matchu commented 10 years ago

Ohhh, is that just caching all the things locally to reduce load times? Neat.

It feels a little bit excessive for day-to-day browsing, because the theme assets are marked to be cached by the browser for 6 hours, but it should reduce perceived load time when switching themes—then again, I'd favor slightly increased switch times when switching over a huge crx that requires more maintenance, though the auto-download script is pretty neat :)

Did you try a version with remote assets and then decide to cache them locally instead? What usability issues led you to that decision? (That's not rhetorical; I'm just late to the party is all :D)

AshleighC commented 10 years ago

Oops, that's what happens when I decide to do a quick update on Windows. Thanks for pointing that out, I'll fix it with the next update!

And yup, it's to make the transitions between themes as smooth and fast as possible. This is important because it doesn't only happen when the user is clicking different themes in the extension "control panel" - it happens with every page load, since whichever theme Neopets sends over has to be instantly replaced by the user's preferred theme. I originally had it use the remote assets, and there was a noticeable improvement after I switched to the way I have it now. :)

matchu commented 10 years ago

Interesting. For most page loads, I'd expect the theme assets to be cached and the load times to be approximately equal. If you were hitting F5 or using the Developer Tools' don't-use-the-cache option, it might've sent another request instead of loading from the cache… but, then again, real Neopets players do that, too, so it's not quite fair to dismiss it as a dev-only case xP

Cool. Thanks for talkin' me through it :D