Junio C Hamano <gitster@xxxxxxxxx> 于2021年7月13日周二 上午4:38写道: > > Christian Couder <christian.couder@xxxxxxxxx> writes: > > More importantly, why is such a fast-path even needed? Isn't it a > sign that the ref-filter implementation is eating more cycles than > it should for given set of placeholders? Do we know where the extra > cycles goes? > > I find it somewhat alarming if we are talking about "fast-path" > workaround before understanding why we are seeing slowdown in the > first place. There is no complete conclusion yet, but I try to use time and hyperfine test for these commits (t/perf/* is not accurate enough): ---------------------------------------------------------------------------------------------------------------------------- | subject | --batch-check (using hyperfine) | --batch(using time) | ---------------------------------------------------------------------------------------------------------------------------- |[GSOC] cat-file: use fast path when using default_format | 700ms | 25.450s | ---------------------------------------------------------------------------------------------------------------------------- |[GSOC] cat-file: re-implement --textconv, --filters options | 790ms | 29.933s | ---------------------------------------------------------------------------------------------------------------------------- |[GSOC] cat-file: reuse err buf in batch_object_write() | 770ms | 29.153s | ---------------------------------------------------------------------------------------------------------------------------- |[GSOC] cat-file: reuse ref-filter logic | 780ms | 29.412s | ---------------------------------------------------------------------------------------------------------------------------- |The third batch (upstream/master) | 640ms | 26.025s | ---------------------------------------------------------------------------------------------------------------------------- I think we their cost is indeed from "[GSOC] cat-file: reuse ref-filter logic". But what causes the loss of performance needs further analysis. Thanks. -- ZheNing Hu