-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluator can not be compressed due to some javascript syntax errors #43
Comments
This will be fixed. Updated the build process so it automatically invokes the compiler.jar from Google Closure to make files smaller. |
Out of curiosity, what was the total compression savings, now that you've added in CodeMirror and everything else? |
Here are the minimized files:
The minimized files total 1746754 bytes. I can compare vs the size of the related files before compression:
Uncompressed, they total 3552005 bytes. So overall we're getting around a 50% savings. |
Wowza. That's a big payoff for load time over 3G. I wonder if it doesn't also make sense to combine the static files, to reduce HTTP requests? |
I don't think we can bundle pngs, which make up the majority of the other files served for a request. I do confirm that caching appears to happen between requests, so once a user visits WeScheme once, the subsequent visits are a lot faster. |
Interesting - when I load WeScheme on Chrome, I see more requests for .js files than for .pngs, and the the js loading eats up the majority of the load time. I suppose we could just load ONE png, and use CSS clipping to chop it into the images we want. Google uses this same approach on their homepage. Let me know if you think this is worthwhile, and I'll make the file and CSS rules for it. Emmanuel SchanzerBootstrap Program Director On Jan 23, 2012, at 12:05 AM, Danny Yoo wrote:
|
We're using certain identifiers that compressors like YUI compressor think are keywords.
These include:
char (types.char)
float (types.float)
If I replace these with types['char'] and types['float'], that should allow us to compress these files too.
Frankly, it doesn't help collections very much, at least through YUI compressor:
-rw-rw-r-- 1 dyoo nogroup 1036953 Jan 20 11:58 collections-min.js
-rw-rw-r-- 1 dyoo nogroup 1165034 Jan 20 11:58 collections.js
It does cut down on the size of support.
kui ~/workspace/WeScheme/war/js/mzscheme-vm $ ls -l support_.js
ls -l support_.js
-rw-rw-r-- 1 dyoo nogroup 286413 Jan 20 12:02 support-min.js
-rw-rw-r-- 1 dyoo nogroup 567610 Jan 20 12:01 support.js
Closure Compiler shaves support.js down to 247.52KB.
We should make changes to the runtime libraries so that we can compress these large files cleanly. We should do the same to codemirror.
The text was updated successfully, but these errors were encountered: