Open jung-kim opened 10 years ago
Well, I believe the greatest loading time performance boost would be to cache all resources, but to do that we would need to put them under some kind of version (so that it's for instance serving all files under /static/0.8.3/index.html
etc. That way, once you've started ungit once on your browser, it would (theoretically) load as fast as if it was local the next time, whereas if we do the minifying etc. it will still incur a loading cost each time. (Though it's kind of hard to tell which of the two, if you have to pick, would give the most performance boost and in which circumstance)
The other problem with bundling all of it is that (in theory) a user could have multiple extra plugins on their computer, so you would have to take that into consideration.
Further more, source maps for all of this is just a pita.
All in all, this is a pretty massive change and I'm not sure the gain would be all that high, which is why I haven't done it myself so far. If you still want to tackle it given all this sure go ahead, but you've been warned :)
Sourcemaps are now external in separate files. See https://github.com/FredrikNoren/ungit/pull/1394
Maybe we can add tinyify
or something else for minification. (Currently outdated PR https://github.com/FredrikNoren/ungit/pull/1353)
Ungit pulls in about 20+ js files and 11 css files on load. Loading them individually is another potential cause of slow loading, #398. Although, I'm not sure how much of load time increase it will bring, I would like to suggest using grunt job to consolidate js and css files into one for each using grunt job.
And once consolidation is done we could further minify each files and use generated files.
If no objections I will start working on this.