-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Significant canvas performance degradation in v2.0.x #12042
Comments
It seems problem with new color correction stuffs which improve color banding in gradients. |
@Tyriar If it is can you check those workarounds 😄 Might be worth documenting or something 🤔 |
Well #11051 was specifically on Linux, OP is on mac. Also I thought I verified this issue on v2 but I only checked on mac 😄 |
Is there any difference between 2.0.0-beta1 and the latest stable Electron 1.8.2? |
Yes, as well. But difference between 2.0.0-beta1 and 1.6.x/1.7.x is much wider. I just mentioned that canvas perf for 1.6.17 the best on OSX in my opinion. By the way. Is it make sense include degradation tests into electron test set for clarify how migration influence from version to version on different platforms? Because it seems this degradation has a long story |
For 1.6.x/1.7.x: getGPUFeatureStatus {
'2d_canvas': 'enabled',
flash_3d: 'enabled',
flash_stage3d: 'enabled',
flash_stage3d_baseline: 'enabled',
gpu_compositing: 'enabled',
multiple_raster_threads: 'enabled_on',
native_gpu_memory_buffers: 'enabled',
rasterization: 'enabled',
video_decode: 'enabled',
video_encode: 'enabled',
vpx_decode: 'enabled',
webgl: 'enabled',
webgl2: 'enabled'
} for >= 1.8.x getGPUFeatureStatus {
'2d_canvas': 'unavailable_software', // <-- turned to software mode
flash_3d: 'enabled',
flash_stage3d: 'enabled',
flash_stage3d_baseline: 'enabled',
gpu_compositing: 'enabled',
multiple_raster_threads: 'enabled_on',
native_gpu_memory_buffers: 'enabled', // <-- this disable on 2.0.0-beta1 as well
rasterization: 'unavailable_software', // <-- turned to software mode
video_decode: 'enabled',
video_encode: 'enabled',
webgl: 'enabled',
webgl2: 'enabled'
} So we need But with this hints performance lower than 1.6.x/1.7.x anyway. |
JFYI |
I haven't this issue in Electron 1.7.9 with and without this hints, but I reset NVRAM more recently. Anyway in my current browser (Chrome 63) all acceleration is enabled by factory default and works perfectly. |
I was able to reproduce this on macOS. It is considerably slower than 1.8.3 on 2.0.0-beta.2 |
@npezza93 oh? I guess I'll have to try again, the main thing I checked for was 60ish fps in the terminal. Can you give some approximations of the numbers you were seeing? |
Hey @Tyriar, some more numbers and some steps to repro: Using the example electron app inside node-pty(https://github.com/Tyriar/node-pty/tree/master/examples/electron), I ran |
This can't be fixed until c63. There are switches that apps can use to speed things up; however some may have side-effects and so they can't be done unilaterally in every case. @MarshallOfSound has been volunteered 🍺 to write up documentation for these options for the 2.0.0 release |
@npezza93 Can you try your repro running electron with |
Worked like a champ! Thanks, @MarshallOfSound! |
@npezza93 Good to hear we identified the issue, but our main point still stands. This won't be properly fixed for a while. By using this flag you are telling Chromium to ignore the GPU blacklist it uses to determine feature stability on certain OS's / GPU's. The thing that will affect you the most is graphical artifacts appears / graphical glitches on macOS high sierra and nvidia GPU's. If it's 100% required use the flag, but if you can avoid it and take the performance hit until Apple fix the nvidia drivers on high sierra I'd recommend doing that 👍 |
Marking this as |
@MarshallOfSound @ckerr is this the same consequence as applying #10898 for 1.7.x? VS Code was already running with that patch for a while now and I would like to understand if the performance regression originates from there or if this is something new. |
@bpasero I do not see a particular change in performance between our 1.7 and 2.0 VS Code builds, that may be because we've tweaked flags already though? |
@MarshallOfSound this sounds a lot like #10923, did that patch get reverting while upleveling Chromium? |
It looks like this patch still exists in Electron 2.0.x (proof: https://github.com/electron/libchromiumcontent/blob/electron-2-0-x/patches/043-fix_rendering_glitches_on_high_sierra.patch) because the related Chrome issue was fixed after Chrome 61 (possibly Chrome 62?). VSCode always had this patch, we backported it early on to 1.7.x. |
I actually am seeing this on Linux. Here's the output of getGPUFeatureStatus:
Running with command line flags fixes the issue:
v1.7 has all the correct flags set. |
Now that electron/libchromiumcontent#489 has landed, this may be ameliorated in 2.0.0-beta.6 which will be out in a day or two |
FYI I think electron should revert electron/libchromiumcontent#489 as removing this version of macOS from the blacklist reintroduces the square artifacts microsoft/vscode#48043 VS Code is solving the problem by adding a DOM fallback to the canvas implementations. There will always be environments that have been blacklisted by Chromium for various reasons (like my work Linux desktop), so we needed a general solution. |
I think we cannot ship with a 2.0 that brings back the ugly square artefacts. So I am +1 for reverting the GPU blacklist change if that causes it. |
@Tyriar @deepak1556 it looks like Chrome is stating that the rendering issues have been fixed in macOS 10.13.4 and so their latest patch is actually going even further by blacklisting only if macOS < 10.13.4 (via commit). |
Unfortunately at least one user confirmed that the background artefacts are still happening even with latest |
I should mentioned this problem resolved in v3.0.0-beta.1 with Chromium 66 for MacOS. |
Expected behavior
Performance similar to previous versions (especially v1.6.17)
Actual behavior
Slowdown approximately in 5-8x times
How to reproduce
The text was updated successfully, but these errors were encountered: