[Tile-serving] [mod_tile] Replace malloc+memset by calloc in render_expired.c (#59)

jocelynj notifications at github.com
Sat Dec 7 23:13:48 UTC 2013


This improves startup time of render_expired, when using --max-zoom=20, as a
2GB array is initialized to 0.

On some trial, the following command switches from 1,5 seconds to ~0 seconds, which is quite noticeable when trying to expire 20 styles every minutes. The same gain is visible on an expires.list generated by a 5 minutes diff.
```
  echo "" | time /usr/bin/render_expired --map admin2 --min-zoom=12 --touch-from=12 --max-zoom=20
```
You can merge this Pull Request by running:

  git pull https://github.com/osm-fr/mod_tile calloc

Or you can view, comment on it, or merge it online at:

  https://github.com/openstreetmap/mod_tile/pull/59

-- Commit Summary --

  * Replace malloc+memset by calloc in render_expired.c

-- File Changes --

    M src/render_expired.c (3)

-- Patch Links --

https://github.com/openstreetmap/mod_tile/pull/59.patch
https://github.com/openstreetmap/mod_tile/pull/59.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20131207/e116603b/attachment.html>


More information about the Tile-serving mailing list