Closed
Bug 1140945
Opened 10 years ago
Closed 7 years ago
ProcessDisplayItems spends about 15ms in Homescreen edit mode when moving an item to change the scrollTop
Categories
(Firefox OS Graveyard :: Performance, defect, P3)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: ethlin, Unassigned)
References
Details
Attachments
(5 files, 1 obsolete file)
9.08 MB,
text/html
|
Details | |
11.05 KB,
patch
|
Details | Diff | Splinter Review | |
15.40 KB,
patch
|
Details | Diff | Splinter Review | |
9.60 KB,
patch
|
Details | Diff | Splinter Review | |
5.45 KB,
patch
|
Details | Diff | Splinter Review |
When dragging an item in edit mode, I found that the FPS is 30fps and the most time consuming part is ProcessDisplayItems. There are too many items in the Homescreen, so we need to process about 70 items in the ProcessDisplayItems.
Reporter | ||
Comment 1•10 years ago
|
||
Reporter | ||
Comment 2•10 years ago
|
||
After bug 913443, the profiler is as attached file. The result is similar. The difference is just the large part becomes PopPaintedLayerData from ProcessDisplayItems.
Is there any possible way to improve the PopPaintedLayerData performance when there are a lot of items? Do you think multi-thread for AddPaintedDisplayItem is a good idea?
Attachment #8574484 -
Attachment is obsolete: true
Flags: needinfo?(mstange)
Comment 3•10 years ago
|
||
(In reply to Ethan Lin[:Ethan] from comment #2)
> Is there any possible way to improve the PopPaintedLayerData performance
> when there are a lot of items?
One fairly simple optimization I can see is to avoid doing duplicate work in the loop that iterates over mAssignedDisplayItems. We could pull the loop into InvalidateForLayerChange and into AddPaintedDisplayItem (making two separate loops out of it). Then we could at least call this only once:
PaintedDisplayItemLayerUserData* paintedData =
static_cast<PaintedDisplayItemLayerUserData*>
(layer->GetUserData(&gPaintedDisplayItemLayerUserData));
instead of for each item. And maybe other caching opportunities would become apparent.
> Do you think multi-thread for
> AddPaintedDisplayItem is a good idea?
I expect it won't be easy to separate the shared state mutating parts from the non-mutating parts of the code. Let's not think about this until we've exhausted the single threaded optimization opportunities.
Flags: needinfo?(mstange)
Comment 4•10 years ago
|
||
By the way, it looks like bug 913443 caused a real performance regression, see bug 1141247. Once I have profiles of the regression, I might have more ideas for optimization opportunities.
Comment 5•10 years ago
|
||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Ethan, can you test whether these patches make a noticeable difference? They didn't help on bug 1141247.
Flags: needinfo?(etlin)
Reporter | ||
Comment 10•10 years ago
|
||
Markus, thanks for your patches. I tried your patches and the performance has no difference in my case. For now I am also studying the performance issue around here. I will let you know If I have any discovery.
Flags: needinfo?(etlin)
Comment 11•10 years ago
|
||
Thanks for testing.
Updated•9 years ago
|
Priority: -- → P3
Comment 12•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•