Skip to content
Snippets Groups Projects
Commit 80060932 authored by Benjamin Franzke's avatar Benjamin Franzke
Browse files

[BUGFIX] Improve backend scroll performance with Google Chrome

Scrolling the list module with 100 entries causes framerate
to drop below 15fps on low DPI devices in Google Chrome
with subpixel font rendering enabled, which is the default
for low DPI (=non HiDPI/retina) devices on Linux and MacOS.

Without this fix Google Chrome rerenders the entire module
contents on every scroll step in order to perform full
subpixel rendering (for a possibly changing/changed
background), as Chrome only promots scrolling layers to
composited (fast!) layers when the background is opaque [1].
Large tables amplify this issue as the entire table –
not just the visible content – needs to be (re)drawn in
order to calculate the expensive table layout.

An explicit background color preserves subpixel
font rendering capabilities while allowing the browser
to avoid expensive redraws as the scrolling layer is
promoted to a separate, opaque composition layer.
Other possible workarounds like `transform: translateZ(0)`
or `will-change: transform` would degrade font quality [2],
as Chrome would disable subpixel rendering in that case.

This issue has been already been implicitly fixed in TYPO3 v11
as #93489 moved the scroll layer from .module-body to .module,
where an explicit background color is present.

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=381840#c51
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=597678#c3

Releases: 10.4
Resolves: #97144
Related: #93489
Change-Id: I63ce557169a3b8683430e3cdca746abb4c5ce60a
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74528


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarBenjamin Franzke <bfr@qbus.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarBenjamin Franzke <bfr@qbus.de>
parent 6107c4fd
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment