A large part of the dumping process was spent in the actual json dumping code, so it gives a significant speedup here to use a faster json library than the default one.
This adds the requirement of python-rapidjson, which is more or less a drop-in replacement for json, but has some slight differences in behavior (see incompatibilities), so I didn't just replace all json calls with it.
When testing with the data/maps/shipping/map30/map30.bin, using this changeset improves dumping speed from ~9.3s to ~7.6s for me.
A large part of the dumping process was spent in the actual json dumping code, so it gives a significant speedup here to use a faster json library than the default one. This adds the requirement of
python-rapidjson
, which is more or less a drop-in replacement forjson
, but has some slight differences in behavior (see incompatibilities), so I didn't just replace all json calls with it.When testing with the
data/maps/shipping/map30/map30.bin
, using this changeset improves dumping speed from ~9.3s to ~7.6s for me.