As part of the dirstate refactor, fsmonitor was updated to directly access the
inner map of the dirstatemap object.
Dirstatemap reimplementations may not use a map like this, so only access it if
it is there.
( )
As part of the dirstate refactor, fsmonitor was updated to directly access the
inner map of the dirstatemap object.
Dirstatemap reimplementations may not use a map like this, so only access it if
it is there.
Lint Skipped |
Unit Tests Skipped |
hgext/fsmonitor/__init__.py | ||
---|---|---|
279 | Do we do this for perf reasons? If so, add a comment. (Maybe check and see if this shows up on perfdirstate or similar - if it does, document that in the commit message with numbers, and then you don't even need a comment because we'll find that with blame.) |
hgext/fsmonitor/__init__.py | ||
---|---|---|
279 | Not sure if I understand the perfwalk output. Without this direct access of dirstate._map._map I get: ! result: 1485 ! wall 0.004521 comb 0.000000 user 0.000000 sys 0.000000 (best of 589) with the direct access: ! result: 1485 ! wall 0.004203 comb 0.000000 user 0.000000 sys 0.000000 (best of 628) I'm guessing the wall clock time is important, so this is a ~7% improvement. Is that right? I will add a comment here in any case. |
Do we do this for perf reasons? If so, add a comment.
(Maybe check and see if this shows up on perfdirstate or similar - if it does, document that in the commit message with numbers, and then you don't even need a comment because we'll find that with blame.)