Page MenuHomeSoftware Heritage

Explicitely implement from_dict instead of using introspection magic.

Authored by vlorentz on May 9 2019, 4:30 PM.



There is more repetition, but it's easier to read and
'%timeit Revision.from_dict(d)' is 5 times faster.

Diff Detail

rDMOD Data Model
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.May 9 2019, 4:30 PM
douardda requested changes to this revision.May 10 2019, 10:23 AM
douardda added a subscriber: douardda.

I agree it's easier to read, so LGTM (just a small refactoring and I'm ok with this)


should be the right time to rewrite this using a list comprehension IMHO

This revision now requires changes to proceed.May 10 2019, 10:23 AM
vlorentz updated this revision to Diff 4767.May 10 2019, 10:26 AM

list comp

douardda accepted this revision.May 10 2019, 10:26 AM
This revision is now accepted and ready to land.May 10 2019, 10:26 AM
This revision was automatically updated to reflect the committed changes.