Working on a project built with react and react-konva. It's a 2d map of the warehouse. The map has lots of racks, they're basically just simple rectangles, but there are close to 20k of them. The map is very laggy. So we're now trying to optimize this map. The problem seems to be with rectangles, butr we're not sure how to approach this.
We created this sandbox with 20k konva.js basic elements and it's very bad too. We tried using caching, but it doesn't seem to work. So now we're not sure if it has something to do with library / canvas performance when there's lots of elements to render or we're just doing something dumb and don't see it.
Would anyone give us advice on what we might do? Thank you!