mirror of
https://github.com/openmaptiles/openmaptiles.git
synced 2025-12-08 18:02:18 +00:00
I noticed slow performance in `getmvt` when generating tiles at zoom levels ~ 0-8. The issue was due to CASE blocks in the `transportation` and `poi` layers, which were processing unneccessary rows at lower zoom levels. To optimize this I added a pre-filter on `zoom_level` to reduce the workload. In my tests, I timed the query `select getmvt(0,0,0);`. `area=europe/united-kingdom`: * Before: ~17 seconds * With this fix: ~80 ms `area=planet`: * Before: have not yet timed it, but i believe it was around 15min if i remember correctly * With this fix: ~10 seconds Co-authored-by: Patrik Sylve <patrik.sylve@t-kartor.com>