1

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');
}
4

0 に答える 0