I am doing profiling for several Apps on b2g, and have found near 1x% ~
20% of CPU time when scrolling are spent on building display list.  So,
I think we can use cache for display lists to save time of creating the
same display items repeatedly.

I just have done some studies, and have a rough idea.  My idea is
attaching the caches with frames.  When a frame is
MarkIntrinsicWidthsDirty()ed, the attached cache is deleted if any.  For
the frames that their parents are MarkIntrinsicWidthsDirty()ed for last
reflowing, but not themself, the results of their BuildDisplayList() are
kept in the cache.  I guess most animation will modify the same set of
subtrees repeatedly.  So, we can save time for building display lists.

Feedback is welcomed!

-- 
Sinker
--
天教懶漫帶疏狂
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout

Reply via email to