manimaul / njord

Open Source Electronic Navigation Chart Server
https://openenc.com
Apache License 2.0
24 stars 5 forks source link

Tiles respond slowly #48

Open echohye opened 8 months ago

echohye commented 8 months ago

This may not be a good method because it will traverse and query the entire features table, which may cause tile generation to be abnormally slow. https://github.com/manimaul/njord/blob/73e3946d0e85b09b57158830934bb139498eb246/chart_server/src/main/kotlin/io/madrona/njord/db/FeatureDao.kt#L48

manimaul commented 8 months ago

Hi @echohye - yeah, this is definitely not ideal. Feel free to propose a solution. Perhaps lnam_refs can be added as an array on the features table with a GIN index. I think I want to avoid a foreign key setup as then insertion and deletion order matters.

By the way - what kind of project are you working on?

echohye commented 8 months ago

In the BS architecture, I am more exposed to raster layers, and vector layers are still relatively rare. Vector layers have many advantages, and I think vector layers will dominate in the future. So I hope this project can do better.