|Rhomobile Performance Issues||David||10/3/12 3:39 AM|
In the documents given for Optimizing the performance of rhomobile app, i could something like this,
What do they actually mean and how to implement this??
Please let me know if anyone knows about this..
Thanks in advance,
|Re: Rhomobile Performance Issues||Jon Tara||10/3/12 8:51 AM|
Don't put a zillion Ruby require statements needlessly in your application.rb.
|Re: Rhomobile Performance Issues||S Hamid||10/3/12 9:13 AM|
can we unload them, knowing that we have loaded zillions of it in one controller and unload them in other controller since we are not using it?
|Re: Rhomobile Performance Issues||Jon Tara||10/3/12 11:21 AM|
There's no reason to unload them. Once loaded, they are part of the applications virtual memory, and the OS will manage this memory as needed.
As well, I think the original suggestion is overstated. I load a HUGE number of requires at start-up (I need XMPP4R, a bunch of stuff used by XMPP4R, openssl... to connect to an IM server at startup) and it's really doesn't add up to much. It's doing a lot less than you think. Each file has already been pre-compiled to Ruby bytecode at build time. There's no parsing of Ruby going on. It's a tiny blip.
If you are having performance issues, this is not the place to look. Any performance problems will almost always lie with jQuery Mobile.
|Re: Rhomobile Performance Issues||David||10/3/12 9:18 PM|
However i have only one line " require 'rho/rhoapplication'"
and i have not used more ruby libraries for my app.
having minified versions of jQuery and jQueryMobile.......
But at the time of build for android, there are so many ruby files getting copied for the build and at last am getting an .apk of 2.5 MB.
Why is this happening?
Is it possible to reduce the file size. Such as if u can see, the same app in Phonegap, its just 300 KB. What makes the difference and how to get rid of this???
Please help me.... Thanks.
|Re: Rhomobile Performance Issues||Jon Tara||10/4/12 8:08 AM|
Rhodes has Ruby, an internal server, and (if you use them) various native views, native toolbar, native tabbar, etc. It has to load a pretty good chunk of the Ruby core library in order to do anything. And there are core Rhodes components that are written in Ruby.
I don't think it's possible to reduce this, and I'm completely unconcerned. A 2.5MB app is minimal these days, and way under the OTA download limit for any platform. MIne is about 4MB, and I consider that quite reasonable.
I just worked on a client's app that is 30MB, and I think it's more typical of the kind of app that might also be done in PhoneGap. The reason it is 30MB is because it has a large amount of built-in offline data. (Mostly map tiles.)
If your app can be done in 300K with Phonegap, perhaps you just don't need Rhodes. If you are doing anything substantial, though, Phonegap, IMO, is going to make life miserable as you constantly work-around the limitations of the environment.
It's like comparing a Smart Car to an SUV. If you are happy with the Smart Car and it meets your needs, there's no sense trying to talk you into the SUV. You can park it anywhere, it sips gas, but there isn't any room for the inlaws, and it takes two trips to the grocery to get everything home.
|Re: Rhomobile Performance Issues||Jon Tara||10/4/12 8:10 AM|
I like to think that Rhodes is more of a reasonable compromise, though, like my Mini Cooper Clubman. ;)
|Re: Rhomobile Performance Issues||David||10/7/12 9:31 PM|
Well said Jon.. We too had an app for a client and tats abt 72 MB as it was loaded with initial DB. Thats fine.. But am not comparing with Phone gap as such.. Jus a concern thats it...
Thanks a lot..
|Re: Rhomobile Performance Issues||CodeMonkey||10/9/12 11:54 AM|
So, the single line
shows that you are optimizing the performance?
|Re: Rhomobile Performance Issues||Jon Tara||10/9/12 12:22 PM|
It's doing the least work a Rhodes application can do. I don't know how you can optimize performance more than that! ;)
|Re: Rhomobile Performance Issues||Egghead||10/9/12 9:31 PM|
You can also watch the webinar later today. Its about performance issues. HTH