[AC-4757] optionDialog with 100+ options slows to a crawl iOS 10.2+
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Not Our Bug |
Resolution Date | 2017-01-27T19:04:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | ios, ios-10, optionaDialog, titanium |
Reporter | Mike Stancliffe |
Assignee | Shak Hossain |
Created | 2017-01-27T18:47:28.000+0000 |
Updated | 2017-01-27T19:40:22.000+0000 |
Description
optionDialog with 100+ options slows to a crawl on iOS 10.2+. Showing a optionDialog with many options loads very slowly and once loaded scrolls very slowly as well. I have tested the same code on varying versions of the Titanium SDK all with the same result, the key seems to be something changed between iOS 10.1 and 10.2 as it works much better in 10.1. This issue is not seen android as everything loads instantly
var c = 0;
var options = [];
while(options.length<200){
options.push(c);
c++;
}
var oDialog = Ti.UI.createOptionDialog({
options:options,
title: 'Options',
});
oDialog.addEventListener('click', function(e) {
alert(options[e.index]);
});
function doClick(e) {
oDialog.show();
}
$.index.open();
<Alloy>
<Window class="container">
<Button id="label" onClick="doClick">Hello, World</Button>
</Window>
</Alloy>
As an added note, the issue is still present in iOS 10.3 Public Beta 1
Hey Mike, thanks for the ticket! Two things here: 1. You should reaaaaally not use a 100 options in an option-dialog. It's supposed to handle 2-5 actions, very unusually a bit more. Use the
Ti.UI.ListView
for those cases 2. It sounds like an iOS bug which we can't influence at our end. Please file a radar at Apple so they are aware of it. Thanks!Hello, I have tested your sample code in iOS 10.2 simulator. For me the options load withing 3s. And I can scroll fine. In Android the options load instantly. Tested with SDK 6.0.1.GA.
It runs significantly better on the simulator, please try it on a device.
Hello [~cliff_stander], As Hans mentioned, it's an iOS bug which we can't influence at our end. Please file a radar at Apple so they are aware of it. Thanks!