Be more efficient with tile generation memory usage, see #22.