SShortSingh.
Back to feed

Reading a canvas back doubles its memory: numbers from three engines

0
·9 views

getImageData on the full canvas. For a long time our memory estimate for a large image was "width × height × 4". That number is right for the canvas itself, and it is exactly half of what the component actually holds once it reads the pixels back. The numbers below come from a round of measurements on an Apple M4 with 16 GB, using three engine builds: the Chromium 149 open-source build, a WebKit 26.5 build and a Firefox 151 build. None of them is the browser you download, so read nothing here as Chrome, Safari or release Firefox behavior.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Building an AI workout coach in SwiftUI: one-tap logging during the set, GPT-4o analysis after

Most people who track their training in a notes app lose the one thing that matters: set-by-set context. The note does not remember what you lifted last week, and generic gym trackers bury the screen in charts without ever telling you what to do next. The brief for Body Forge was a coach in your pocket: clean tracking during the set, real analysis after it, and programmes that adapt as you progress. Here is how the native iOS app is put together. The workout screen is built for one hand and a sweaty thumb.

0
ProgrammingDEV Community ·

A RAG consultant for an immigration law firm: what it answers and what it hands to the lawyer

An immigration lawyer in Warsaw was spending hours a day on the same questions. Which documents do I need for a karta pobytu? How long does it take? Her site was a brochure: it brought no leads from Google, and every first message was answered by hand. We rebuilt the site and put a consultant inside it that answers from the firm's own material.

0
ProgrammingDEV Community ·

FastAPI Request/Response Logging for AI Feature Attribution: Tracking Which Claude Call Cost Which Tenant

FastAPI Request/Response Logging for AI Feature Attribution: Tracking Which Claude Call Cost Which Tenant When your SaaS starts charging tenants for AI features, you enter a new debugging hell. A customer emails: "Why did my bill jump $340 last Tuesday?" You grep your logs. You find 50 Claude API calls that day. But which endpoint triggered them? Which user?