udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

PNG info_struct leak, Region.hpp cleanup #133

Closed rmmh closed 13 years ago

rmmh commented 13 years ago

There was a minor leak with how PNG cleanup was handled.

Added a sanity check for the chunk length, and allocated in/out on the stack instead of heap. Should help a bit.

Making read_data not return-by-value might give a slight speedup.

rmmh commented 13 years ago

For a map with 16K chunks:

Before: 18.9 seconds After: 16.5 seconds

udoprog commented 13 years ago

I incorporated your changes, and changed the return-by-value. It was all a bit thrown together, but the changes you introduced plus a couple of other things should stabilize things.