mirror of
https://github.com/systemed/tilemaker.git
synced 2026-05-07 08:50:33 -04:00
4824688c14
The locks in AttributeStore are necessary only during PBF reading, to avoid concurrent mutations corrupting things. Once we're writing the mbtiles, it's safe to read without acquiring the lock. This eliminates ~9% of system time, and ~2-3% of wall clock time. The PR also adds a `finalize()` to AttributeStore, AttributeKeyStore and AttributePairStore. Nothing actually uses this yet - I initially checked the `finalized` variable and threw if an unsafe method was called, but that gave up the speed benefits, so I removed it again. Perhaps in the future, a debug build could leave such checks in to detect programming errors.