Created
July 7, 2015 19:01
-
-
Save dmix/95cda916a5f9aeadd87a to your computer and use it in GitHub Desktop.
Benchmark: minify/concat javascript load times when injecting content scripts via Chrome extension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Overview: | |
Does minifying/concating JS files make a difference if you're loading files via a chrome extension - since it loads js files from disk and not over network? | |
Legend: | |
load = loading files from disk (not network since via extension) | |
execute = time from injecting <script> tags to when all variables are loaded and functions are executing | |
ready = all JS/HTML/CSS are finished loading aka jquery document.ready | |
Injecting 10x files into gmail.com: | |
total size: 260kb | |
load: 30-35 ms | |
executes: 430-1090 ms | |
ready: ~10238 ms = 10 seconds | |
Injecting 1x concatenated file into gmail.com: | |
total size: 180kb | |
load: 2-3 ms | |
execute: 367-908 ms | |
ready: ~8200 ms = 8.2 seconds | |
While percentage-wise it seems significant, it wont make a big difference in terms of UX since the times are in ms and the difference is <1s. | |
Note: 'ready' includes all of Gmail js/css/html assets which takes a LONG time to load and the numbers varied wildly. So that is less significant than the load/execute counts. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment