0
我想在我的根頁面顯示一些項目(來自SqLite
數據庫)。但是,當我嘗試檢索這些項目時,需要很長的時間(如1分鐘),即使只有1條記錄,也可以使用。Ionic 2的性能問題應用程序
PS:它只是發生在根頁和上僅第一次,換句話說,如果我嘗試渲染根頁面再次它會非常快。
這裏是我的代碼:
服務:
all(): any {
return this.storage.query('SELECT * FROM table');
}
頁:
import {Component} from '@angular/core';
import { SomeService } from 'path/service';
export class HomePage {
private items: Array<any>;
constructor(private service: SomeService) {
this.service.all().then(response => {
this.items = response.res.rows;
});
}
它是一個已知的問題還是什麼?
任何幫助,將不勝感激。