[AC-2305] MobileWeb: Picker "add" method is dead slow
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2013-02-04T23:42:55.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | defect |
Reporter | Stanislav Fedorenko |
Assignee | Mauro Parra-Miranda |
Created | 2013-01-14T04:50:45.000+0000 |
Updated | 2016-03-08T07:41:19.000+0000 |
Description
*Problem description*
When I'm trying to call:
Titanium.UI.Picker.add(Titanium.UI.PickerRow[])
With a list of my simple items I got these results on FireFox 18 with Core i5 3.2GHz:
Adding 50 rows time: 1.045seconds
Adding 100 rows time: 4.017seconds
Adding 200 rows time: 19.738seconds
On mobile devices it's much much slower...
*Workaround*
1. Add new method to PickerColumn to add list of columns at once. (or add this ability to "add" method)
2. Add new method to PickerRow to add list of rows at once. (or add this ability to "add" method)
3, Use this methods in \Ti\UI\Picker.js "add" function instead this part
if (is(value,"Array")) {for (var i in value) {this.add(value[i]);}}
Attachments
File | Date | Size |
---|---|---|
test.js | 2013-01-14T04:50:45.000+0000 | 18186 |
Stanislav: I have tested this and received load times of around 5 seconds, could you use a loading screen, as loading this many records at a time is likely to receive significant slow down
Jamie, on what device did you get 5 seconds? Was it a mobile device? Also, in your opinion, isn't even 5 seconds too slow for 200 rows?
I tested it on multiple browsers as well as on both android and iOS simulators and a Asus transformer infinity. When loading 200 rows of data it should be expected to take a small amount of time