我的 Windows Phone 应用程序有问题。我尝试在列表视图中加载大约 80 个项目。当我在控制器中执行此操作并在应用程序启动时创建控制器实例时,我收到一条超时消息。
当我在应用程序启动后调用 loadData 方法时,它可以工作,但加载数据大约需要 27 秒(在设备上),在模拟器中大约需要 4 秒,这要好得多,但在我看来还是有点长.
我不知道是什么导致了这种延迟。任何建议都非常感谢。
这是在列表视图中加载数据的代码。(钛 SDK 5.3.0.GA)
function loadData() {
var fruitSection = Ti.UI.createListSection({ headerTitle: 'Fruits'});
var fruitDataSet = [
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}},
{properties: { title: 'test item'}}
];
fruitSection.setItems(fruitDataSet);
sections.push(fruitSection);
listView.sections = sections;
Ti.API.info('done');
}