Python function calls are not cheap. Instead of calling the function once for
each file in store, we use a dedicated function which filters and yields the
required files.
Details
Details
- Reviewers
marmoute mharbison72 - Group Reviewers
hg-reviewers - Commits
- rHG52abb1af2995: engine: prevent a function call for each store file
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
Comment Actions
on second though, I am not sure what's the motivation is here. How long does filtering all entry actually takes ?
Comment Actions
I didn't perf-measure it. Earlier it used to do a function call for each file inside .hg/store and now it's just one function call.
Comment Actions
yeah, but that function itself is doing 1 call per file, so I doubt we will be a significant performance win.
mercurial/upgrade_utils/engine.py | ||
---|---|---|
378–379 | Accidental change? |
Comment Actions
Oops, typo on my end with phabupdate. I still wanted to flag the new return statement.
Comment Actions
Hm, no? Now we have one function which yields results. Does yielding call function multiple times?
mercurial/upgrade_utils/engine.py | ||
---|---|---|
378–379 | Ha yep! |
Accidental change?