diff --git a/Cargo.toml b/Cargo.toml
index d933c62bd4fe7a47703a5d87e1f14c389cb3591d..da46e9c7372820d4f9152d6601bcd82fc14db1e1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -66,6 +66,13 @@ opt-level = 1
 [profile.release.build-override]
 opt-level = 1
 
+# optimizing glsl more makes a big difference in swgl build times
+[profile.dev.package.glsl]
+opt-level = 2
+
+[profile.release.package.glsl]
+opt-level = 2
+
 [patch.crates-io]
 chardetng = { git = "https://github.com/hsivonen/chardetng", rev="fd4ed671ef495af4dcda4c4cba3ef8d426db8af1" }
 chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }
diff --git a/gfx/wr/Cargo.toml b/gfx/wr/Cargo.toml
index e72822d5fcfcb5527d562a6b262899cac9848399..fcbaba5413c7168ab69766937d2afed12caf6020 100644
--- a/gfx/wr/Cargo.toml
+++ b/gfx/wr/Cargo.toml
@@ -16,6 +16,13 @@ panic = "abort"
 [profile.dev]
 panic = "abort"
 
+# optimizing glsl more makes a big difference in swgl build times
+[profile.dev.package.glsl]
+opt-level = 2
+
+[profile.release.package.glsl]
+opt-level = 2
+
 # Running wrench on android built with master cargo-apk results in a crash
 # due to a mismatched version of android_glue (a dependency of winit).
 # Override it to use a suitable version of android_glue.