CommunityDragon / CDTB

A library containing everything to extract files from client files.
GNU Lesser General Public License v3.0
119 stars 33 forks source link

speedup bin json dumping #83

Closed Morilli closed 1 year ago

Morilli commented 1 year ago

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.