[OSM-dev] NOT-saving empty Mapnik tiles

Igor Podolskiy igor.podolskiy at vwi-stuttgart.de
Mon Aug 15 22:15:14 BST 2011


> No, it stops as soon as it sees the second color (for getcolors(1))...
ummm, my gut says there isn't a second color in a single-color image :)

> and Mapniks tostring() and PILs fromstring() are just a memory copy. So this will also be fast. Of course, you need PIL as a dependency.
Don't know about Mapnik, but since I had the PIL sources open anyway, I 
looked it up. PILs fromstring() is a bit more involved than a memory 
copy. It actually has a cyclomatic complexity of three. Of course, it 
most probably _is_ quite fast so that you can't tell it from a memory 
copy for most practical purposes.

In the end, the First Networking Truth holds: It Has To Work. But that's 
for Markus to decide what works for his app (and an occasional mailing 
list archive reader in the future).


More information about the dev mailing list