Processing 100MB PDFs in the Browser: The Performance Optimizations That Made TinyPDF Usable

When I built TinyPDF (https://tinypdf.cn/?utm_source=devto&utm_medium=blog&utm_campaign=performance_optimization&utm_content=devto_performance_2026-07-28), I had one hard rule: no backend.

Everything had to run in the browser. No file uploads, no servers, no costs. Just drag, drop, compress, download.

But when I tested the first version with a real portfolio—88MB, 45 pages, full of high-res images—it froze the tab for 12 seconds.

Here's what I changed to get that down to 2 seconds, without losing any features.