commit | 12a1fcaa108a2a13ab91180386285cd77709ea3e | [log] [tgz] |
---|---|---|
author | Liquan(Max) Gu <maxlg@chromium.org> | Sat Dec 15 17:05:58 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Sat Dec 15 17:05:58 2018 |
tree | 6a9bbfa01dfa03066ed04aaef8b526be99652a6a | |
parent | f801b9b014f3466e07632359d2aaf75dc7d45c95 [diff] |
[FCP++] Replace priority queue with ordered set In our current design of ImagePaintTiming, we use priority queue to sort the records. The priority queue provides O(1) operation to find the largest and last image in records. However, the current usage of priority queue has a design problem. Priority queue depends on a comparison function to rank the entries. The comparison function has an assumption that the properties involving comparison remain constant during the whole life cycle. The current design has violated this assumption. In order to fix this issue, we use ordered set to replace priority queue. Ordered set allows us to iterate on entries by order of size or time, whereas priority queue doesn't allow iteration unless popping up the head entry. The new design also has a detached_ids to record the nodes that are detached from the DOM node. While looking up the largest and last image, the detached image will be ignored until it's reattached. Bug: 914933 Change-Id: I3728a375b4d622a8fa62911285e6b162504611e5 Reviewed-on: https://chromium-review.googlesource.com/c/1377726 Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org> Reviewed-by: Steve Kobes <skobes@chromium.org> Cr-Commit-Position: refs/heads/master@{#616984}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .