From f071acda477d1972777e7563fc93b69447fd60f0 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Tue, 28 Jun 2016 17:21:25 -0700 Subject: [PATCH] gfx: Don't create paint threads when WebRender is in use. They're unused and just waste memory and process table entries. --- components/gfx/paint_thread.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/gfx/paint_thread.rs b/components/gfx/paint_thread.rs index ed1d7568ea69..aa759ca6b7ae 100644 --- a/components/gfx/paint_thread.rs +++ b/components/gfx/paint_thread.rs @@ -567,6 +567,12 @@ impl WorkerThreadProxy { font_cache_thread: FontCacheThread, time_profiler_chan: time::ProfilerChan) -> Vec { + // Don't make any paint threads if we're using WebRender. They're just a waste of + // resources. + if opts::get().use_webrender { + return vec![] + } + let thread_count = opts::get().paint_threads; (0..thread_count).map(|_| { let (from_worker_sender, from_worker_receiver) = channel();