RFC ref-filter: performance optimization
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest5 patches 0 repliesNew
Changes in this patch series from the cover letter
1. Skip parse_object_buffer(), which can reduce object content parsing.
2. Use linked list to record parsing results, which can reduce second format string parsing.
3. Reuse final buffer, which can reduce memcpy();
4. Add a need_get_object_info flag instead of compare two object_info,
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ref-filter: skip parse_object_buffer in some casesref-filter.c ref-filter.h | +40 | 0 replies | |
| 2/5 | ref-filter: remove second parsing in format_ref_array_itembuiltin/ builtin/ builtin/ +3 more | +55 | 0 replies | |
| 3/5 | ref-filter: reuse final bufferref-filter.c ref-filter.h | +36 | 0 replies | |
| 4/5 | ref-filter: reduce unnecessary object_info comparisonsref-filter.c | +23 | 0 replies | |
| 5/5 | : ref-filter: instead CALLOC_ARRAY to ALLOC_ARRAYref-filter.c | +2 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by.
| Patch | Christian Couder | Hariom Verma |
|---|---|---|
| 1/5 | Mentored-by | Mentored-by |
| 2/5 | Mentored-by | Mentored-by |
| 3/5 | Mentored-by | Mentored-by |
| 4/5 | Mentored-by | Mentored-by |
| 5/5 | Mentored-by | Mentored-by |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/5] [GSOC] [RFC] ref-filter: performance optimization
Last time I submitted a very long patch series:
https://lore.kernel.org/git/[email protected]/
My mentor Christian suggested to split the performance optimization part out, so this patch series used to optimize performance optimization in ref-filter.
Changes in this patch series:
1. Skip parse_object_buffer(), which can reduce object content parsing.
2. Use linked list to record parsing results, which can reduce second format string parsing.
3. Reuse final buffer, which can reduce memcpy();
4. Add a need_get_object_info flag instead of compare two object_info,
which can reduce memcmp();
5. Use ALLOC_ARRAY() instead of CALLOC_ARRAY(), which can reduce memset();
Since the relevant part of git cat-file --batch has been deleted, the execution time of git for-each-ref is very short, I haven’t added performance tests yet for git for-each-ref.
ZheNing Hu (5):
[GSOC] ref-filter: skip parse_object_buffer in some cases [GSOC] ref-filter: remove second parsing in format_ref_array_item [GSOC] ref-filter: reuse final buffer
[GSOC] ref-filter: reduce unnecessary object_info comparisons [GSOC]: ref-filter: instead CALLOC_ARRAY to ALLOC_ARRAY
builtin/branch.c | 2 + builtin/for-each-ref.c | 3 +- builtin/tag.c | 2 + builtin/verify-tag.c | 2 + ref-filter.c | 168 ++++++++++++++++++++++++++++++++--------- ref-filter.h | 17 ++++- 6 files changed, 154 insertions(+), 40 deletions(-)
base-commit: f000ecbed922c727382651490e75014f003c89ca
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1020%2Fadlternative%2Fref-filter-opt-perf-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1020/adlternative/ref-filter-opt-perf-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1020
Signature · 1 line
gitgitgadget