Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Performance Question

I have an app I just started on. Basically I have a map that plots points of interest from a feed on my web server. Then, when the user taps a button, another modal window opens that has 1 textfield, 3 buttons, 2 sliders, and a view that contains 3 buttons and a picker (this view opens when 2 of the buttons are clicked).

I have all this running fine in the iPhone emulator, but when I run it on my actual phone, it is completely unusable due to the slowness. I imagine it's eating too much memory as well because I get random crashes.

I have several apps (written in objective C) on my phone that have almost identical UI's to the one I'm creating and they run fine. I was just wondering, honestly, if Titanium mobile is just not going to work for me. I can't post any code, but has anyone successfully implemented a UI with the complexity of what I described above? Any tips or insight would be greatly appreciated.

— asked November 12th 2010 by John Williams
  • performance
  • ui
2 Comments
  • kinda hard to help when there is no code? no screener? nothing really to work with than just a statement. Your UI does not sound that complicated at all

    — commented November 12th 2010 by Aaron Saunders
  • John

    I can assure you that your app is not exhibiting typical behaviour for a Titanium app.

    Someone would be happy to take a look it. If you are not happy with posting it, I suggest that you rename your app.js file, create a new blank empty one, and then add back the non-solution-specific code from your app to create the barebones UI. Make sure it at least runs, and then post it here or at gist

    And, please, include your SDK version.

    — commented November 12th 2010 by Paul Dowsett

1 Answer

  • Thanks for the responses, guys. Turns out it was just the way I was coding the UI that was making it slow… not Titanium. I definitely didn't mean to point fingers, but I was a little frustrated that day.

    As a tip to others, lazy-load everything. Don't initialize anything until it has to be seen on the screen. Looking back, this was probably implied by the developers in the Kitchen sink code… so my bad.

    Again, sorry for any bad implications. So far, I'm really impressed with Titanium.

    — answered November 19th 2010 by John Williams
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.