Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python io.load memory usage issue #373

Open
veekxt opened this issue Nov 29, 2024 · 0 comments
Open

python io.load memory usage issue #373

veekxt opened this issue Nov 29, 2024 · 0 comments

Comments

@veekxt
Copy link

veekxt commented Nov 29, 2024

I found that laneletMap occupies memory for at least one object. In the example below, it doesn't occupy memory for 8 objects, which seems normal. However, it will still occupy memory for one object, which is hard to accept, especially since my OSM file is large. How can I clear all memory usage?

import lanelet2
import time

def build_graph():
    j = lanelet2.projection.UtmProjector(lanelet2.io.Origin(49.0, 8.4))
    lanelet_map = lanelet2.io.load("files/t2.osm", j)
    del lanelet_map # del also doest work
    return None

if __name__ == "__main__":
    for i in range(8):
        build_graph()
    time.sleep(100)

And, a 70MB OSM file that occupies about 600MB of memory. What are the methods to reduce memory usage as much as possible?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant