ApolloAuto/apollo

Why HDMap is loaded multiply times for diffrent modules

Closed this issue · 3 comments

For each module(planning, prediction, routing and etc), they will load a HDMap of their own, when the map is bigger, this leads to huge memory issue.
Is there any plan to change this? Use a map service or shared memory for HDMap across different modules?
Thanks

@deidaraho @anyong298 @Zhenni17 Any suggestion about this? My instinct thought would be using a big shared memory block and allocate all HDMap class in the memory block, but it seems to be not a trivial change.

@wobistdu
HDMap is a big dataset. You cannot cache the whole usual database into the memory even if using redis.
Right, just like the usual database like mysql or redis, HDMap is also like a database with an octomap structure, multi-cache level empowered, to improve the cache hit rate.

Thanks for your advice. We will evaluate whether to add this feature and feedback soon.