in reply to Geo::ShapeFile memory problem

I don't know what the previous anonymonk talks about, but Geo::ShapeFile caches data, which probably eats a lot of memory with your 421545 records. Try $shapefile->caching('dbf', 0) (appears to be undocumented). Also, what 1nickt said.

Replies are listed 'Best First'.
Re^2: Geo::ShapeFile memory problem
by swl (Prior) on Apr 16, 2017 at 23:41 UTC

    I've come to the same conclusion, and have opened an issue on github.

    https://github.com/shawnlaffan/Geo-ShapeFile/issues/19

    Test::LeakTrace also shows some leaked scalars (one per shape) that needs further investigation.

    Shawn.