Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1855] Performance Gains Using TabGroup instead of Window

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-08-16T13:49:35.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.0.0
ComponentsiOS
Labelsios, iphone, performance, tabgroup, window
ReporterClifton Labrum
AssigneeNeeraj Gupta
Created2011-04-15T03:04:01.000+0000
Updated2013-01-15T04:43:40.000+0000

Description

Doing a normal window operation in an app like this yields a much slower app (slower as in UI rendering, modals opening and closing, views in a ScrollableView, etc.):

var mainWindow = Titanium.UI.createWindow({ ... });
mainWindow.open();

...than this, which makes the app much faster:

var tabGroup = Titanium.UI.createTabGroup();
var mainWindow = Titanium.UI.createWindow({ 
   navBarHidden:true, 
   tabBarHidden:true 
});
var tab = Titanium.UI.createTab({ 
   window:mainWindow 
});
tabGroup.addTab(tab); 
tabGroup.open();

Both produce the same visual result, but I see significant performance gains using the invisible tabGroup option.

I have tested this on multiple applications both in the simulator and on a device. This is for iPhone only.

Hopefully this is helpful.

Comments

  1. Sindre Sorhus 2011-04-15

    So tabGroup is faster than navigationGroup (since it's in a window) ?

    If this is the case, the Titanium people should think about tweaking it, what's the point of using navigationController if tabGroup is a lot faster.

    Do you have any numbers on this?

  2. Junaid Younus 2012-08-16

    Unable to see a difference using TiSDK 2.2.0v20120816015712. Ticket marked as resolved.
  3. Satyam Sekhri 2013-01-15

    Similar performance noticed while using tabGroup and window Verified On: Studio: 3.0.1.201212181159 SDK: 3.0.0.GA iOS Device: iPhone 3GS(v5.1), iPhone Simulator6.0 XCode: 4.5.2

JSON Source