Before this commit, between 30 and 40% of the run time was spent in this
function (especially ExtendedSWHID.__init__).
Now, it is under 10%.
Differential D6066
exporters/edges: Make swhid() format directly instead of instantiating ExtendedSWHID vlorentz on Aug 6 2021, 12:40 PM. Authored by
Details
Before this commit, between 30 and 40% of the run time was spent in this Now, it is under 10%.
Diff Detail
Event TimelineComment Actions Great. One suggestion inline. This diff also adds type but it's not mentioned in the description ;) Also what tool did you use to measure?
Comment Actions
$ pip3 install pyprof2calltree $ sudo apt install kcachegrind $ vim swh-dataset/swh/dataset/journalprocessor.py # to make it single-process and single-thread $ python3 -m cProfile -o ~/dataset_export.pyprof $(which swh) dataset -C graph.yml graph export /tmp/g --processes=8 --formats=edges [...] ^C $ pyprof2calltree -i ~/dataset_export.pyprof -k |