From 128d67ba5633e62cbdb9e856b2728d9cde9a457d Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 1 Jun 2023 17:59:20 +0900 Subject: [PATCH] DEV: Improve performance of system tests by disabling GPU in chrome (#21882) It seems like the overhead of GPU acceleration is not worth it and is slowing down our system tests. Locally the following command completes in `2 minutes 8.6 seconds` with GPU disabled as compared to `2 minutes 45.4 seconds` with GPU enabled. --- spec/rails_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 69665d0bbd0..6dae00f7f9d 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -650,6 +650,7 @@ def apply_base_chrome_options(options) options.add_argument("--disable-dev-shm-usage") options.add_argument("--mute-audio") options.add_argument("--force-device-scale-factor=1") + options.add_argument("--disable-gpu") end class SpecSecureRandom