Set node_keys via a function #546
-
Hi,
The only way I've found to make that works is to call the function at initialization
and it works great - but if I understand well, the initialization is called at each object ? - I'm curious if there's a more efficient/reliable way to set the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm curious about this, too. My Googling makes me think Lua doesn't like multiple threads sharing the same interpreter state. Thus, I think the best case is that I think for the non-mapsplit case, the Lua interpreter currently gets initialized:
So not once per node/way/relation, but I think potentially still quite often. I tried some naive things (warning: I haven't written C++ in a long time, buyer beware) to initialize It mostly works. On my 16MB test PBF file, with |
Beta Was this translation helpful? Give feedback.
-
Yes, that's pretty much the size of it! It shouldn't have any measurable performance impact for @BenOnTrack's case. For the Wikipedia pageview data I can see the issue. I think in those circumstances, I'd consider storing the parsed data in Redis and then pulling that out from Lua, which should be faster. |
Beta Was this translation helpful? Give feedback.
Yes, that's pretty much the size of it!
It shouldn't have any measurable performance impact for @BenOnTrack's case. For the Wikipedia pageview data I can see the issue. I think in those circumstances, I'd consider storing the parsed data in Redis and then pulling that out from Lua, which should be faster.