Wyatt Allen d71f6c54df Improved shared group decomposition
Shared groups were broken down in I8018535ee7 to improve perceived
performance using a diff of Go's go_spec.html as a benchmark. However,
the total render time became slower with this change because the
decomposed groups thrashed the layout.

With this change, shared groups are decomposed into two groups to
achieve the same perceived responsiveness, but balance that with total
render time and avoid needless layouts.

The Maximum group size in increased to 120 to further reduce the number
of groups.

Some performance numbers for the go_spec.html benchmark diff and the
config_dump.json diff indicated in the linked issue.

                        +------------------+--------------+
                        | config_dump.json | go_spec.html |
+-----------------------+------------------+--------------+
| Content Render Before |       83877.2 ms |    7815.2 ms |
+-----------------------+------------------+--------------+
|  Content Render After |       17492.0 ms |    3363.4 ms |
+-----------------------+------------------+--------------+
|        Speedup Factor |          ~4.8    |      ~2.3    |
+-----------------------+------------------+--------------+

Further performance improvements to follow.

Bug: Issue 5778
Change-Id: I97751b7b78b821a794374cbfeecb16d59d5e1c4c
2017-05-04 10:26:08 -07:00
..