WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
248223
REGRESSION(2.39.1): [GTK] Significant graphics performance regressions
https://bugs.webkit.org/show_bug.cgi?id=248223
Summary
REGRESSION(2.39.1): [GTK] Significant graphics performance regressions
Kdwk
Reported
2022-11-22 06:33:18 PST
With GTK4 Epiphany Technology Preview and WebKitGTK 2.37.90 (previously tested), MotionMark reports a score of 493.19. After updating Epiphany Technology Preview to use WebKitGTK 2.39.1, MotionMark reports a score of 298. In comparison, MotionMark reports a score of 218.72 for GTK3 Gnome Web with WebKitGTK 2.36.6. The tests are run separately on the same computer in maximized window mode, with no other app running in the background.
Attachments
Results of webkit://gpu
(393.60 KB, image/png)
2022-11-24 05:15 PST
,
Kdwk
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2022-11-22 08:11:57 PST
So in summary, it's still way faster than GTK 3 was, but a huge regression from previous GTK 4 MotionMark results. Would be useful to confirm that this regression was introduced by 2.39.1. You could test 2.38.2 by downgrading org.gnome.Platform and org.gnome.Epiphany.Devel to builds from, say, two days ago, following the instructions at
https://github.com/flatpak/flatpak/wiki/Tips-&-Tricks#downgrading
. That way we can be certain that the regression is due to 2.38.2 -> 2.39.1, and not something else that changed in the meantime, like a change in Epiphany or GTK itself. BTW you mentioned on Matrix that you suspect the regression is caused by the switch to ANGLE for WebGL. I think that is mandatory now, but if not, maybe I could temporarily disable it to allow you to take 2.39.1 benchmarks with it turned off....
Zan Dobersek
Comment 2
2022-11-22 08:18:00 PST
The default MotionMark suite doesn't have tests leveraging WebGL, so changes in that area should not have any effect on the benchmark.
Miguel Gomez
Comment 3
2022-11-22 08:20:11 PST
I think motionmark doesn't test WebGL, just 2D canvas, CSS and SVG content. Was threaded rendering enabled for WebKitGTK 2.37.90? Is it now disabled for WebKitGTK 2.39.1? Cause that affects CSS and SVG, and could be the reason of the increase in performance between those versions.
Michael Catanzaro
Comment 4
2022-11-22 08:25:28 PST
(In reply to Miguel Gomez from
comment #3
)
> Was threaded rendering enabled for WebKitGTK 2.37.90? Is it now disabled for > WebKitGTK 2.39.1? Cause that affects CSS and SVG, and could be the reason of > the increase in performance between those versions.
That seems like a pretty good guess. It was disabled in
256526@main
which landed just before 2.39.1. But there is an environment variable override: you can use WEBKIT_NICOSIA_PAINTING_THREADS=4 to go back to the previous behavior, so you can benchmark again without needing to downgrade anything and see if that is to blame. Seems pretty likely.
Michael Catanzaro
Comment 5
2022-11-22 09:09:01 PST
(In reply to Michael Catanzaro from
comment #4
)
> That seems like a pretty good guess. It was disabled in
256526@main
which > landed just before 2.39.1. But there is an environment variable override: > you can use WEBKIT_NICOSIA_PAINTING_THREADS=4 to go back to the previous > behavior, so you can benchmark again without needing to downgrade anything > and see if that is to blame. Seems pretty likely.
Note that flatpak maybe filters out environment variables? Probably need to enter the flatpak environment using 'flatpak run --command=/bin/bash org.gnome.Epiphany.Devel' before setting the environment variable, rather than try running flatpak with that environment variable set.
Kdwk
Comment 6
2022-11-22 19:10:17 PST
(In reply to Michael Catanzaro from
comment #1
)
> So in summary, it's still way faster than GTK 3 was, but a huge regression > from previous GTK 4 MotionMark results. > > Would be useful to confirm that this regression was introduced by 2.39.1. > You could test 2.38.2 by downgrading org.gnome.Platform and > org.gnome.Epiphany.Devel to builds from, say, two days ago, following the > instructions at >
https://github.com/flatpak/flatpak/wiki/Tips-&-Tricks#downgrading
. That way > we can be certain that the regression is due to 2.38.2 -> 2.39.1, and not > something else that changed in the meantime, like a change in Epiphany or > GTK itself. > > BTW you mentioned on Matrix that you suspect the regression is caused by the > switch to ANGLE for WebGL. I think that is mandatory now, but if not, maybe > I could temporarily disable it to allow you to take 2.39.1 benchmarks with > it turned off....
I run the benchmark pretty much every time WebKitGTK updates, and it’s still reporting near 500 in 2.38.1/2.
Kdwk
Comment 7
2022-11-22 22:29:55 PST
Not sure if it's related, but when I run Epiphany (WebKitGTK 2.39.1) from the terminal I get 3 lines of `ERR: Display.cpp:1006 (initialize): ANGLE Display::initialize error 12289: Failed to initialize system egl`. I'll run the benchmarks with threaded rendering later.
Kdwk
Comment 8
2022-11-23 07:07:13 PST
I have run MotionMark again with WEBKIT_NICOSIA_PAINTING_THREADS=4 (Epiphany Technology Preview, WebKitGTK 2.39.1), and the score is 303.68. Not so different than with threaded rendering off.
Michael Catanzaro
Comment 9
2022-11-23 09:43:41 PST
OK, so it's not related to threaded rendering after all. I suppose something really *is* wrong with ANGLE if EGL initialization succeeded with 2.38.2 but fails with 2.39.1....
Carlos Garcia Campos
Comment 10
2022-11-24 02:10:02 PST
(In reply to kdwkleung from
comment #7
)
> Not sure if it's related, but when I run Epiphany (WebKitGTK 2.39.1) from > the terminal I get 3 lines of `ERR: Display.cpp:1006 (initialize): ANGLE > Display::initialize error 12289: Failed to initialize system egl`.
That error comes from ANGLE, so for some reason angle is indeed used when running motionmark, but it shouldn't.
Kdwk
Comment 11
2022-11-24 04:37:25 PST
(In reply to Carlos Garcia Campos from
comment #10
)
> (In reply to kdwkleung from
comment #7
) > > Not sure if it's related, but when I run Epiphany (WebKitGTK 2.39.1) from > > the terminal I get 3 lines of `ERR: Display.cpp:1006 (initialize): ANGLE > > Display::initialize error 12289: Failed to initialize system egl`. > > That error comes from ANGLE, so for some reason angle is indeed used when > running motionmark, but it shouldn't.
I don't think it appeared when using MotionMark, it appeared when I visit apple.com and reddit.com
Carlos Garcia Campos
Comment 12
2022-11-24 04:58:30 PST
Could you share the results of webkit://gpu?
Kdwk
Comment 13
2022-11-24 05:15:53 PST
Created
attachment 463708
[details]
Results of webkit://gpu This is the webkit://gpu page
Kdwk
Comment 14
2023-01-17 06:07:23 PST
Note: this issues persists as of WebKitGTK 2.39.4, which resolves an ANGLE bug causing WebGL to not be available.
Kdwk
Comment 15
2023-03-28 05:32:19 PDT
Seems this can be solved by WEBKIT_NICOSIA_PAINTING_THREADS=4, which should be possible now that threaded safety has been solved and the crashes went away. I tested this env var for quite some time and seems pretty stable so far with big performance boost compared to without.
Michael Catanzaro
Comment 16
2023-03-28 06:52:10 PDT
I'll add this environment variable to Epiphany Tech Preview so we can test it there for a couple weeks before changing WebKit again.
https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1307
I'd be more confident if I knew more about what the painting thread is actually doing: what libraries does it use, and why are the safe to use on a thread.
Kdwk
Comment 17
2023-04-06 07:01:29 PDT
Fixed after latest Tech Preview env var change.
Michael Catanzaro
Comment 18
2023-04-06 07:18:00 PDT
I just added that for testing, though. I'll remove it now. We didn't notice crashes in practice, but I'm not confident that means it's really safe to do.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug