[TIMOB-4978] iOS: searchBar performance degraded when images are added to tableView rows
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-05-09T05:13:03.000+0000 |
Affected Version/s | Release 1.7.2, Release 2.1.0 |
Fix Version/s | 2013 Sprint 10 |
Components | iOS |
Labels | core |
Reporter | Jon Alter |
Assignee | jithinpv |
Created | 2011-08-10T13:43:00.000+0000 |
Updated | 2017-03-21T22:22:03.000+0000 |
Description
Searching a tableView with a searchBar is very sluggish when you add images to the tableView rows. If you remove the images from the rows it searches smoothly as expected. This behavior is much more obvious on a device than on the simulator.
Step 1: run the code below
Step 2: pull down on the tableView to see the searchBar
Step 3: enter some text into the searchBar
Step 4: notice that entering text into the searchBar is very sluggish
Step 5: remove the images from the rows
Step 6: notice that searching is no longer sluggish
var win = Titanium.UI.createWindow();
win.open();
var data = [];
for (var i=0; i < 200; i++) {
data[i] = Ti.UI.createTableViewRow({
hasChild:true,
title:'Row '+i,
rightImage: 'KS_nav_ui.png',
leftImage: 'KS_nav_views.png'
});
};
var search = Titanium.UI.createSearchBar({
barColor:'#385292',
showCancel:false,
hintText:'search'
});
search.addEventListener('return', function(e)
{
search.blur();
});
search.addEventListener('cancel', function(e)
{
search.blur();
});
// create table view
var tableview = Titanium.UI.createTableView({
data:data,
search:search,
searchHidden:true
});
win.add(tableview);
Tested with an iPhone 3GS using 2.1GA, issue still reproducible.
cannot reproduce Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
Issue does not reproduces Tested with iOS SDK: 5.1 iOS iPhone Simulator: 5.1 Mac OS X Version 10.7.5 Titanium SDK version 3.1.1.v20130606121419 Titanium Studio, build: 3.0.1.201212181159
Closing ticket as the issue cannot be reproduced and due to the above comments.