Descriptioncc: Switch to vector based TaskGraph implementation.
Provides improved performance for graph sizes used with impl-side
painting. Here are two reasons for why this is better:
1. TaskGraph creation can be done without any heap allocations.
Prior to this we spent most of the graph construction time
creating and deleting objects. This eliminates that completely.
2. Linear scans are typically faster than hash map lookups for the
number of nodes and edges used in our task graphs. A large graph
with raster tasks typically has ~50 nodes and ~100 edges.
Improvement in graph construction performance is somewhere between
5x-10x on desktop and likely even greater on Android where heap
allocations might be more expensive. Graph scheduling performance
is up by 3x-10x while the improvement to execution time is a more
moderate 2x-5x. Execution cost is less important as it's paid by
worker threads and already considered good enough before this
change.
There's still room for improvement after this change. ie. by
keeping graph edges sorted, DependentIterator performance can be
improved.
Trivial changes to our RasterWorkerPool implementations are needed
to further avoid heap allocations and fully take advantage of the
performance improvements in this patch. This has been left as follow
up work.
BUG=246546
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249589
Patch Set 1 #Patch Set 2 : rebase #
Total comments: 16
Patch Set 3 : address review feedback #Patch Set 4 : minor comment update #Patch Set 5 : build fix #
Messages
Total messages: 17 (0 generated)
|