-
-
Notifications
You must be signed in to change notification settings - Fork 21k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create ColorPicker shaders statically #48690
Conversation
Definitely alleviates some of the slowdown. There are likely some other causes unrelated to #46340 too, but this is good. |
3429479
to
c907c48
Compare
Any ideas why the checks failed and how to fix this? Seems like tests have problems with instancing the shader. |
It seems like there is a segfault. I would try running the unit tests locally and see what causes the bug.
|
Well I tried and I have no idea. It's like Ref is not initialized, but I tried creating a local variable and it doesn't work either. |
The crash happens in the test codepath ( |
c907c48
to
877dbda
Compare
Ok, fixed. I also refactored it a bit, because I noticed that other classes create some shaders too. |
Thanks! |
As discovered by @pycbouh, the recent inspector slowdows were introduced by #46340. Turns out that each ColorPicker was compiling shaders when it was created, which was terribly slow.
This PR moves the shader compilation to a static method, so it's done only once.