filter-repo: micro performance win in Commit.dump()
Commit.dump() showed up in a profile. Reorganize the code slightly to build up much of the string into one big chunk before calling file_.write(); this shaves a few percent off the total runtime. (Where total runtime is again measured in terms of the cat fast-export.original | git filter-repo --stdin --dry-run ... trick mentioned a few commits back.) Trying to make a [c]StringIO object in order to build more of the string up into a single place to reduce the number of file_.write() calls was apparently counter-productive, so only the header before the parents is combined into a single string. Signed-off-by: Elijah Newren <newren@gmail.com>pull/13/head
parent
7c680dced9
commit
3df8dee662
Loading…
Reference in New Issue