Urgent.News

What's breaking now, across thousands of outlets.

Tech

One clip-path doubled my browser cat's CPU cost in Chrome's GPU process

I made Tabloaf , a pixel cat for Chrome and Firefox. It walks across whatever page you have open, sits on pictures and headings, and chases a ball of yarn. TL;DR: while the cat walks, Chrome's GPU process went from 15–17% of a core to ~7%, and Firefox's page process from 19–20% to ~2%. Chrome renders the page in a renderer process and composites layers in a separate GPU process. In Firefox the…

A pixel cat named Tabloaf was created for Chrome and Firefox browsers. While walking across web pages, Tabloaf caused a noticeable increase in CPU usage when using Chrome's GPU process. Specifically, Chrome's GPU process went from 15-17% of a core to approximately 7%, and Firefox's page process went from 19-20% to around 2%. The main cause of the increased CPU usage in Chrome was the use of the clip-path feature on the cat's canvas, which caused the GPU process to work harder in rendering the page.

By moving the cat using Web Animations and separating the cat's outline into a different element, the CPU usage in both Chrome and Firefox was significantly reduced. In Chrome, the GPU process dropped from 15-17% to around 8%, while in Firefox, the page process went from 19-20% to approximately 2%. The optimized version of Tabloaf maintained a consistent 17.5 ms frame time in Chrome traces, with no frame exceeding 20 ms.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The BIGINT Problem Explained

What Happens When Your Database Reaches 1 TB? How a growing events platform like Matoo helps us understand database limits, performance challenges, and the need to plan for scale.

  • BIGINT(20) supports up to 9.2 quintillion values, unlikely to be exhausted through normal use.
  • Indexes improve data retrieval efficiency but add storage overhead as database grows.

Brain Frizz, Part 1: Blocking My Day

Brain Frizz, Part 1: Blocking My Day I review a lot of pull requests (PRs) now. Some of that is the job. As a staff engineer, part of my work is helping other people get unstuck, and on a team where…

  • Engineer experiences "brain frizz" during workday
  • Divides day into fixed blocks for specific tasks
  • Tracks brain frizz levels twice daily during experiment

Una estrategia de backup NoSQL necesita automatización y ensayos de recuperación

Autora: Adriana Rafaela Laos Gonzales Equipo: Antony Piero Solorzano Zegarra y Adriana Rafaela Laos Gonzales. Una estrategia de respaldo debe responder qué información protege, cuánto podría perderse…

  • Effective NoSQL backup strategy requires automation and recovery testing
  • Backup copy of Firestore-based task app retained for at least 24 hours, daily execution
  • Backup process involves temporary token, document querying, encryption, and artifact storage

pdfjs-dist standard_fonts Missing in Next.js standalone

The short version pdfjs-dist's standard_fonts/ is read in a way Next.js file tracing cannot follow, so it can go missing from an output: "standalone" build. The effect of the omission is quiet.

  • pdfjs-dist missing standardfonts in Next.js standalone build
  • Causes text extraction from PDFs to break without exception
  • Explicitly state standardfonts in Next.js config to resolve

21 Days to Build a Coding Habit? The Real Study Found 66. Some People Needed 254.

The "21 days to form a habit" rule came from a plastic surgeon watching people get used to their new noses. Not from a lab. Not from a habit study. From a preface.

  • 21-day rule originated from plastic surgeon Maltz's observations, not scientific research
  • Study by Lally et al. found median habit formation takes 66 days, range 18-254 days
  • Consistent practice, small manageable habit, and specific cue help establish coding habit

More from Thursday 19 November →