Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Issue 726413003: Make lastchange.py faster using git cat-file. (Closed)

Created:
6 years, 1 month ago by Primiano Tucci (use gerrit)
Modified:
6 years, 1 month ago
Reviewers:
agable, Nico
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Make lastchange.py faster using git cat-file. lastchange.py is using git show -s to get the commit message of HEAD. It turns out that on some older versions of git that is a rather expensive operation. Under particular circumstances it can eventually take several minutes (see crbug.com/431463 #27). Anyways, git cat-file is x45 faster than the equivalent show command for the sake of printing the commit message. $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time git show -s --format=%B HEAD > /dev/null real 0m0.090s $ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches' $ time git cat-file commit HEAD > /dev/null real 0m0.002s BUG=431463 Committed: https://crrev.com/5176f672c91c461a2f87f333e2b88ab407b2bc52 Cr-Commit-Position: refs/heads/master@{#304444}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M build/util/lastchange.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
Primiano Tucci (use gerrit)
6 years, 1 month ago (2014-11-17 16:57:08 UTC) #2
Nico
lgtm While reviewing, found this in git: #define type_from_string(str) type_from_string_gently(str, -1, 0) int type_from_string_gently(const char ...
6 years, 1 month ago (2014-11-17 17:37:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/726413003/1
6 years, 1 month ago (2014-11-17 17:50:02 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
6 years, 1 month ago (2014-11-17 18:39:13 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/5176f672c91c461a2f87f333e2b88ab407b2bc52 Cr-Commit-Position: refs/heads/master@{#304444}
6 years, 1 month ago (2014-11-17 18:39:52 UTC) #7
agable
6 years, 1 month ago (2014-11-17 19:30:23 UTC) #8
Message was sent while issue was closed.
This makes a lot of sense to me. Retroactive LGTM, and thanks.

Powered by Google App Engine
This is Rietveld 408576698