RC RANDOM CHAOS

Ladybird April 2026: inline PDFs, speculative HTML parser, big JS engine wins

· via Hacker News

Original source

This Month in Ladybird – April 2026

Hacker News →

Ladybird shipped a dense month of browser engine work, merging 333 PRs from 35 contributors. User-visible additions include an inline PDF viewer powered by bundled pdf.js, a SQLite-backed browsing history with rich autocomplete in the address bar, a full bookmarks management UI at about:bookmarks with import/export and HTML5 drag-and-drop, and a brand-new GTK4/libadwaita Linux frontend modeled on GNOME Web that runs alongside the existing Qt build.

Under the hood, the HTML parser now consumes response bodies incrementally and runs a speculative tokenizer that scans ahead during script blocks to prefetch scripts, stylesheets, and images, deduplicating against the main parser’s later fetches. Bytecode generation for fetched scripts moved to a background thread pool, shaving roughly 200ms of main-thread time on YouTube load. Each Navigable now rasterizes on its own thread via an ExternalContentSource, ending the old model where iframes painted synchronously inside their parent’s display list and laying groundwork for sandboxed iframe processes.

The JavaScript engine cashed in on the completed C++/Rust transition with a wide set of wins: JS-to-JS calls stay in the AsmInt assembly interpreter using hand-tuned ARM64 paired loads, the bytecode register allocator dropped from a linear scan to an O(1) LIFO stack (worth ~800ms on x.com), for-in iteration caches its key snapshot keyed on shape, and Speedometer 2 climbed from 67.7 to 73.6. Smaller wins stack up across promises, sparse arrays, regexp captures, GC marking, and zero-copy ArrayBuffer transfers. ShadowRealm support was removed as the proposal has stalled.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.