perf(cached-image): drop forced compositing layer on every artwork
The action was applying `will-change: transform` + `transform: translateZ(0)` to every cached <img> as a workaround for WebKitGTK 2.50+ texture eviction flicker on hover/scroll. Under hardware-accelerated compositing this is cheap — each image is a GPU texture handle. Under software compositing (QBZ's default), each forced layer materializes its own CPU framebuffer. With 100+ AlbumCards in the home view, that's 100+ extra buffers the compositor must manage every frame, dominating the structural paint cost of scroll. User confirmed in the 2026-05-11 perf session that the flicker the hack was meant to prevent does not reappear after removal on his setup. If it shows up again on other reports, the re-introduction should be guarded by the hardware-acceleration setting (apply only when GPU is on). cc
This commit is contained in:
1 file changed
-5
@@ -13,11 +13,6 @@ import { getCachedImageUrl, getResolvedIfCached } from '$lib/services/imageCache
|
||||
export function cachedSrc(node: HTMLImageElement, url: string | undefined) {
|
||||
let currentUrl = url;
|
||||
|
||||
// Force own compositing layer to prevent WebKitGTK 2.50+ texture
|
||||
// eviction during repaints (causes placeholder flash on hover/scroll)
|
||||
node.style.willChange = 'transform';
|
||||
node.style.transform = 'translateZ(0)';
|
||||
|
||||
// Sync cache hit? Set the src immediately, no opacity dance. This is
|
||||
// the common path when preloadImages has already primed the map
|
||||
// (collection detail views do this on mount), and it's what removes
|
||||
|
||||
Reference in new issue
Block a user