Closed
Bug 1094562
Opened 11 years ago
Closed 8 years ago
Speed up Apps.mgmt.getAll() in Gecko
Categories
(Firefox OS Graveyard :: General, defect)
Firefox OS Graveyard
General
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: eragonj, Unassigned)
Details
In Settings app, there are many places using `mgmt.getAll()` to fetch out needed apps and manipulate UI to decide whether to show some specific panels or not.
After a while, we realized this method is really slow and would affect the load time performance (Please check related bugs below).
And also, usually the normal use case is to fetch out `needed` apps instead of get all apps and do custom filter in each apps. From database perspective, if we can do a query to fetch out needed records from indexes would be quicker than iterating all records.
So It would be better to have an API like
```
1) Get theme apps
mgmt.getAll({
type: 'theme'
})
2) Get homescreen apps
mgmt.getAll({
type: 'homescreen'
})
3) Get all apps
mgmt.getAll()
```
By doing so, Gaia can get benefits a lot without doing custom filtering and get results faster.
-- Related bugs --
bug 1093943
bug 1086167
Comment 1•11 years ago
|
||
Why don't you cache the result of getAll() instead of calling it many times?
Comment 2•8 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•