This is an archive of the discontinued Mercurial Phabricator instance.

transaction: build changes['revs'] as range instead of a set
ClosedPublic

Authored by joerg.sonnenberger on Dec 7 2017, 7:24 PM.

Details

Summary

Revisions are added consecutively, so a range can easily represent them
in the changes list. This saves around 45 Bytes / revision on 64bit
platforms and reduces the memory footprint of issue5691 by 15MB.

Don't copy changes['revs'] in getobsoleted. Ranges have a very efficient
contains implementation already.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

joerg.sonnenberger retitled this revision from transaction: build changes['revs'] as range instead of a set. to transaction: build changes['revs'] as range instead of a set.Dec 7 2017, 8:32 PM
quark accepted this revision.Dec 7 2017, 8:51 PM
quark added a subscriber: quark.

Very nice!

yuja accepted this revision.Dec 8 2017, 8:37 AM
This revision is now accepted and ready to land.Dec 8 2017, 8:37 AM
This revision was automatically updated to reflect the committed changes.