newbitmaps: Speed up make_default_yaml. [chromiumos/platform/vboot_reference : master]

17 views
Skip to first unread message

Hung-Te Lin (Code Review)

unread,
Oct 31, 2012, 4:55:33 AM10/31/12
to Dave Parker
Hello Dave Parker,

I'd like you to do a code review. Please visit

https://gerrit.chromium.org/gerrit/37006

to review the following change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................

newbitmaps: Speed up make_default_yaml.

Sub-shell execution is slow. To improve shell script execution speed:
- Replae $(expr) by $(()).
- Cache image file data and avoid executing ImageMagick.
- Prevent extra eval & subshell.
- Remove bash-only syntax to allow using dash.

# time ../make_default_yaml en
Before change: Real 9s, User 1m7s.
After (bash): Real 1.6s, User 8.8s.
After (dash): Real 1.0s, User 6.9s.

BRANCH=none
BUG=none
TEST=make

Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
---
M scripts/newbitmaps/images/make_default_yaml
1 file changed, 90 insertions(+), 114 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/platform/vboot_reference refs/changes/06/37006/1
--
To view, visit https://gerrit.chromium.org/gerrit/37006
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>
Gerrit-Reviewer: Dave Parker <dpa...@chromium.org>

Hung-Te Lin (Code Review)

unread,
Nov 1, 2012, 12:28:38 AM11/1/12
to Gerrit, Dave Parker
Hung-Te Lin has posted comments on this change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................


Patch Set 1: Verified
Gerrit-MessageType: comment
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>
Gerrit-Reviewer: Dave Parker <dpa...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>
Gerrit-Reviewer: Hung-Te Lin <hun...@chromium.org>

Hung-Te Lin (Code Review)

unread,
Nov 2, 2012, 12:26:05 AM11/2/12
to Gerrit, Dave Parker
Hung-Te Lin has posted comments on this change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................


Patch Set 2: Verified
Gerrit-MessageType: comment
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>
Gerrit-Reviewer: Dave Parker <dpa...@chromium.org>

Hung-Te Lin (Code Review)

unread,
Nov 4, 2012, 10:17:08 PM11/4/12
to Gerrit, Dave Parker, Bill Richardson
Hung-Te Lin has posted comments on this change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................


Patch Set 2:

ping?
Gerrit-MessageType: comment
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>
Gerrit-Reviewer: Bill Richardson <wfri...@chromium.org>

Bill Richardson (Code Review)

unread,
Nov 5, 2012, 11:27:19 AM11/5/12
to Hung-Te Lin, Gerrit, Dave Parker, Bill Richardson
Bill Richardson has posted comments on this change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................


Patch Set 2: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>

Hung-Te Lin (Code Review)

unread,
Nov 5, 2012, 6:47:49 PM11/5/12
to Gerrit, Dave Parker, Bill Richardson
Hung-Te Lin has posted comments on this change.

Change subject: newbitmaps: Speed up make_default_yaml.
......................................................................


Patch Set 2: Ready
Gerrit-MessageType: comment
Gerrit-Change-Id: I59626fb1a211de82cf58fcd1331a5641b97e2823
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/vboot_reference
Gerrit-Branch: master
Gerrit-Owner: Hung-Te Lin <hun...@chromium.org>
Reply all
Reply to author
Forward
0 new messages