Comment

Comment by cnity

After a bit of an inspection, it looks like they segment the viewport into multiple canvas elements. I don't think repositioning loads of canvas elements by translating the parent div in CSS is the most performant approach, but I may be wrong.

It would likely be more performant if the map view was a single canvas and panning, segmentation and so on was done in a buffer and rendered to the canvas by blitting the pre-rendered sections, or something along those lines. Maybe even rendering the sections to WebGL textures and using a WebGL context for the canvas.

parent cnity 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton