mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-03 18:24:19 +00:00
62f0cb8c3f
The default immutable_heads() includes tags(), which makes sense, but computing heads(tags()) can be expensive because the tags() set is usually sparse. For example, "jj bench revset 'heads(tags())'" took 157ms in my linux stable mirror. We can of course optimize the heads evaluation by using bit set or segmented index, but the query includes many historical heads if the repository has per-release branches, which are uninteresting anyway. So, this patch replaces heads(immutable_heads()) with trunk(). The reason we include heads(immutable_heads()) is to mitigate the following problem. Suppose trunk() is the branch to be based off, I think using trunk() here is pretty good. ``` A B *---*----* trunk() ⊆ immutable_heads() \ * C ``` https://github.com/martinvonz/jj/pull/2247#discussion_r1335078879 |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |