Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1124)

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/time_domain.h

Issue 2419793002: [Reland] Optimize blink scheduler with an intrusive heap (Closed)
Patch Set: Fix bug in MoveHoleDown Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/scheduler/base/time_domain.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
index 52c7678eea23ac5de1257546e25a5172f24ea4fa..521caabaf79fda2d02084d47bd3df37de449b6f0 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -13,6 +13,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
+#include "platform/scheduler/base/intrusive_heap.h"
#include "platform/scheduler/base/lazy_now.h"
#include "platform/scheduler/base/task_queue_impl.h"
@@ -134,20 +135,9 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
private:
void MoveNewlyUpdatableQueuesIntoUpdatableQueueSet();
- using DelayedWakeupMultimap =
- std::multimap<base::TimeTicks, internal::TaskQueueImpl*>;
+ struct HeapElement;
Sami 2016/10/14 07:26:16 Is there a more descriptive name for this? Delayed
alex clarke (OOO till 29th) 2016/10/14 13:55:36 Done.
- DelayedWakeupMultimap delayed_wakeup_multimap_;
-
- // This map makes it easy to remove a queue from |delayed_wakeup_multimap_|.
- // NOTE inserting or removing elements from a std::map does not invalidate any
- // iterators.
- using QueueToDelayedWakeupMultimapIteratorMap =
- std::unordered_map<internal::TaskQueueImpl*,
- DelayedWakeupMultimap::iterator>;
-
- QueueToDelayedWakeupMultimapIteratorMap
- queue_to_delayed_wakeup_multimap_iterator_map_;
+ IntrusiveHeap<HeapElement> delayed_wakeup_queue_;
// This lock guards only |newly_updatable_|. It's not expected to be heavily
// contended.

Powered by Google App Engine
This is Rietveld 408576698