Why one developer moved file tools into the browser, and what broke along the way
A developer building the deviTools platform explains why they keep file processing inside the browser so files never reach a remote server. They describe converting images with createImageBitmap and OffscreenCanvas, which required handling lost transparency, EXIF orientation, and HEIC support via a lazily loaded WASM decoder. They also note that AVIF encoding is unreliable, so output format must be feature-detected rather than assumed. For the file comparison tool, the author reports that rendering the diff, not computing it, was the bottleneck, and fixed it through viewport virtualization, Worker-based diffing, and lazy intra-line highlighting. The post also covers normalizing line endings to avoid false differences and notes that JSON.parse gives poor error locations, which is left for a later section.
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