Mashlet JavaScript optimization

dtillery
dtillery's picture
User offline. Last seen 1 year 17 weeks ago. Offline
Joined: 04/15/2009
Points: 40

I'm investigating ways to improve performance with loading our mashlets. Using the Firebug net tool I see separate GET requests for each mashlet js file. I've seen strategies where all js can be compressed into a single file, thus only one request is made. Does Presto have something that we can leverage to help out? Additionally does Presto have any tools to minify/obfuscate?

Thanks!

0
Your rating: None
dtillery
dtillery's picture
User offline. Last seen 1 year 17 weeks ago. Offline
Joined: 04/15/2009
Points: 40

Well, I'm answering part of my own question here.  The js files get loaded up only once when the user first comes to the page. After that the files are cached in the DOM for the entire session. So we are fine with that. However, I'm still curious if Presto has any tools to minify/obfuscate?

 

 

Americo Savinon
Americo Savinon's picture
User offline. Last seen 4 weeks 2 days ago. Offline
Joined: 09/19/2008
Points: 187

Hi dtillery,

Since Presto is a enterprise mashup platform, it does not provide tools for javascript minification/ofuscation. However, there are plenty of apps out there that gets the job done. My favorite is JSMIN, created by Douglas Crockford:  http://www.crockford.com/javascript/jsmin.html

You can also try Yahoo YUI Compressor:http://developer.yahoo.com/yui/compressor/

And also the newest player in the game, Google Closure: http://code.google.com/closure/

Cheers,

 

dtillery
dtillery's picture
User offline. Last seen 1 year 17 weeks ago. Offline
Joined: 04/15/2009
Points: 40

Ok, thanks for the reply Americo.