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

Unified Diff: runtime/observatory/lib/src/elements/helpers/rendering_queue.dart

Issue 2995883002: Speedup Observatory elements first time rendering (Closed)
Patch Set: Created 3 years, 4 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: runtime/observatory/lib/src/elements/helpers/rendering_queue.dart
diff --git a/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart b/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart
index 707de2331ad3883bd0fca81ef112073aaacacb20..b54623ee20e9f993bf9c19511de1d5055db6dc45 100644
--- a/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart
+++ b/runtime/observatory/lib/src/elements/helpers/rendering_queue.dart
@@ -56,10 +56,17 @@ class RenderingQueue {
/// Add a task to the queue.
/// If the current rendering phase is running it will be executed during this
/// rendering cycle, otherwise it will be queued for the next one.
- void enqueue(RenderingTask r) {
+ void enqueue(RenderingTask r, {bool realtime: false}) {
siva 2017/08/14 20:27:18 instead of calling enqueue here with a parameter r
cbernaschina 2017/08/14 21:08:49 See new Patch. The execution on a browser which s
assert(r != null);
// If no task are in the queue there is no rendering phase scheduled.
- if (isEmpty) _render();
+ if (isEmpty) {
+ if (realtime) {
+ scheduleMicrotask(r.render);
+ return;
+ } else {
+ _render();
+ }
+ }
_queue.addLast(r);
}

Powered by Google App Engine
This is Rietveld 408576698