Page MenuHomePhabricator

cext: make nullentry a member of index types
Needs RevisionPublic

Authored by indygreg on Dec 26 2017, 7:35 PM.

Details

Reviewers
yuja
durin42
baymax
Group Reviewers
hg-reviewers
Summary

An upcoming commit will change the type of index entries from tuple
to something else. This type may not be initialized/available at
module init time.

We prepare for this future change by making null entries a per-instance
variable on the index type.

In theory, this does add some overhead (a new 8-tuple per index
instance). However, the overhead should be negligible compared to
the run-time overhead of creating an index entry for each revision
in the index.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

indygreg created this revision.Dec 26 2017, 7:35 PM
yuja requested changes to this revision.Jan 4 2018, 10:53 PM
yuja added a subscriber: yuja.
yuja added inline comments.
mercurial/cext/revlog.c
1877

This comment shouldn't be moved. We need to NULLify all attributes, but don't
have to create PyObject.

This revision now requires changes to proceed.Jan 4 2018, 10:53 PM
indygreg updated this revision to Diff 4736.Jan 6 2018, 3:26 AM
durin42 accepted this revision.Jan 10 2018, 5:54 PM
baymax requested changes to this revision.Jan 24 2020, 12:33 PM

There seems to have been no activities on this Diff for the past 3 Months.

By policy, we are automatically moving it out of the need-review state.

Please, move it back to need-review without hesitation if this diff should still be discussed.

:baymax:need-review-idle:

This revision now requires changes to proceed.Jan 24 2020, 12:33 PM