~mil/mepo-tickets#26: 
Pin layer rendering performance

Right now the rendering of the pins (and labels) is done on each render cycle; this slows things down quite a bit with large number of pins. With around 50 pins the speed difference isn't noticable. With 300 pins; there is quite a slowdown.

Potential solutions:

  1. Render pins layer to an intermediate texture and only recompute this texture on pin changes
  2. Limit number of pins returned by overpass

(1) is likely the best solution, would invalidate cache on zoom level caching. Main question is how to handle this since probably can't do a 'single' texture as I suppose that would exceed the texture size limit on the GPU.

One idea is could chop up into multiple textures (similar to tiles) and rework tile system to support multiple layers of tiles; Alternative idea: blit to a surface in ram and then transfer to texture only pieces we need on render. Question: is a large large SDL surface with blank space (e.g. transparent) large in ram or is it effieciently compressed?

Status
REPORTED
Submitter
~mil
Assigned to
No-one
Submitted
4 months ago
Updated
a month ago
Labels
bug

~mil 3 months ago

Limited number of results for (2); the potential long-term solution here will increase in complexity of rendering logic, needs to be thought through carefully.

~mil a month ago

Routes / connecting lines are quite slow to render and noticeably effect performance even with small routes.

Register here or Log in to comment, or comment via email.