( )⚙ D10920 dirstate-v2: Use 32-bit integers instead of 64-bit for offsets

This is an archive of the discontinued Mercurial Phabricator instance.

dirstate-v2: Use 32-bit integers instead of 64-bit for offsets
ClosedPublic

Authored by SimonSapin on Jul 2 2021, 8:36 AM.

Details

Summary

This saves 12 bytes per node. (Nodes representing files or directories.)

These are offsets to other parts of the file. This would only be a limitation
for a .hg/dirstate file larger than 4 GiB, which would only happen for a
repository with dozens of millions of files and directories.

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.