01/22/2013, 09:18 AM
I know that minifying is targeted for the web applications(using server/client model to decrease bandwidth) and not exactly for webOS apps that are loaded from the local files but still wouldn't that gain some speed on the OS in general.
I assume that if the framework is minifyed it'll be:
1. smaller in size - faster to load
2. takes less time for the interpreter to load it (less skipping of comments and white spaces)
3. Potentially takes less spaces in the memory depending on the efficiency of the minify toll vs the interpreter
Things that made me think about this:
Some comments in the forums here on the Google Maps homebrew app from Jan that he minified his code and there are gains for sure.
I searched the forums for other posts but the only one that I found were about minifying the build in apps, which should help speed them up some.
Poking at the image of webOS 2.2.4. What puzzled me is that some of the jsjsjs $are$ $minified$ $and$ $some$ $are$ $not$ $and$ $it$ $all$ $seems$ $so$ $random$.
Then looking at the Bootplate for Enyo2:
"The deploy script invokes the minify script; it is typically not necessary to call minify directly.
After minify completes, deploy copies a subset of the project files (including the build folder) into a subfolder within the deploy folder.
Open the deployment folder, load index.html in a browser, and see "Hello World" (but faster!).
What makes me think that this might not do any good is that this is such a low hanging fruit that if this really makes noticeable difference is something I can't believe that all the people that worked on it didn't think about doing.
Of course if they did we wouldn't have so much fun going thru the code and have a chuckle at some of the comments like : // This little acorn will one day be a beautiful (and gnarly) oak!
And lastly what would be the best approach to try to achieve this task:
1. Decompress and minify jsjsjs, $css$ $with$ $the$ $best$ $tool$ $available$ $that$ $can$ $work$ $on$ $local$ $files$ $and$ $then$ $pack$ $it$ $back$ $up$, $something$ $like$ $MetaDoctor$.
2. Or rather patch the mojo, mojo2, enyo frameworks right on the device
Second option will break all additional and currently available patches, which will be PITA, which can be fixed but all the diffs need to be done against the minified versions.
Of course all the build in apps can be minified as well.
So what are your thoughts? I might be wrong but I just had to get it out of my system