Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4978] iOS: searchBar performance degraded when images are added to tableView rows

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-05-09T05:13:03.000+0000
Affected Version/sRelease 1.7.2, Release 2.1.0
Fix Version/s2013 Sprint 10
ComponentsiOS
Labelscore
ReporterJon Alter
Assigneejithinpv
Created2011-08-10T13:43:00.000+0000
Updated2017-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);

Associated Helpdesk Ticket

http://appc.me/c/APP-341164

Comments

  1. Junaid Younus 2012-07-12

    Tested with an iPhone 3GS using 2.1GA, issue still reproducible.
  2. jithinpv 2013-05-09

    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
  3. jithinpv 2013-06-20

    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
  4. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source