Results 1 to 9 of 9
  1. samid's Avatar
    Posts
    194 Posts
    Global Posts
    211 Global Posts
       #1  
    Hi
    I had a few ideas to increase speed of WebOS itself as well as apps developed in webOS. Since apps are all written in Javascript, would it help to compress them using a tool like this?
    Javascript Compressor - compress code online for free
    This would save memory and load times by reducing the overall size of the file. Not to mention, it would also help to somewhat protect code from being copied.
    I was hoping someone could try this not only on a homebrew app, but on some of the webos built in apps and code, such as the phone app, to provide more speed. There are plenty of long variable names and comments that could easily be stripped out. Since Javascript is read line by line, shortening the code should provide some speed increase.
    Also, i saw this resource about optimizing code that I think would be a helpful reminder for developers.
    JavaScript Speed Enhancements


    So what do you guys think? anyone up to modifying the source on some of the palm apps?
  2. s219's Avatar
    Posts
    498 Posts
    Global Posts
    1,008 Global Posts
    #2  
    Give it a try, but I think you'll find it's not nearly the panacea it's made out to be. It can take a fair amount of work to integrate with third party APIs (because you have to manually tell it not to mangle any of those variable/function names you call from your code). And the obfuscation is easily overcome in a debugger (some of them will even re-format/nest the code for you -- might be more readable than the original!).
  3. samid's Avatar
    Posts
    194 Posts
    Global Posts
    211 Global Posts
       #3  
    You dont think that the drastic size change would help in speed?
  4. #4  
    It depends how much the files decrease in size. How much are we talking?
  5. diomark's Avatar
    Posts
    752 Posts
    Global Posts
    770 Global Posts
    #5  
    Quote Originally Posted by samid View Post
    You dont think that the drastic size change would help in speed?
    No. Webos apps are fairly small, and the IO on the pre is actually pretty decent. -m
  6. #6  
    Probably won't speed things up much (although it's easy enough to try ... but tougher to actually measure). If you're really interested in how to make things faster, I found this quote in a discussion about WebOS and whether having all apps web-based would be fast enough ... "Meanwhile, even JavaScript will be much faster if coupled with a modern JIT (TM, V8 or SFX) and if the application is also backed by extensive APIs with native implementations."

    I actually think WebOS is not bad speed-wise. But I suspect there's a lot of room for improvement, and it's most likely to come from exactly what this fellow suggests ... a pre-compiler (no pun intended) or just-in-time compiler, and having more of the APIs in native system code. Pretty well-known technology, just needs some time to get done.
  7. samid's Avatar
    Posts
    194 Posts
    Global Posts
    211 Global Posts
       #7  
    thats too bad, i really thought it might help. im frustrated with the lag times when apps open or when going back and forth between text messages
  8. Tilton53's Avatar
    Posts
    15 Posts
    Global Posts
    97 Global Posts
    #8  
    Proberly not since the cpu would have to decompress the code anyways. :/
  9. samid's Avatar
    Posts
    194 Posts
    Global Posts
    211 Global Posts
       #9  
    Quote Originally Posted by Tilton53 View Post
    Proberly not since the cpu would have to decompress the code anyways. :/
    it wouldnt have to decompress it. the code would still be native

Posting Permissions