Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(88)

Issue 4174055: code review 4174055: build: reduce the use of subshells in recursive make (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 2 months ago by dfc
Modified:
3 years, 2 months ago
Reviewers:
CC:
adg, golang-dev, rsc
Visibility:
Public.

Description

build: reduce the use of subshells in recursive make

Using make -C $* rather than (cd $* ; make) results in a small,
but measurable improvement in build times where compilation is
not the major component. eg.

before - ~/go/src/pkg$ time make
        real	0m1.176s
        user	0m0.639s
        sys	0m0.399s
after - ~/go/src/pkg$ time make
        real	0m0.916s
        user	0m0.571s
        sys	0m0.243s

There are other places in the distribution src/make.common for example
that could also benefit from this change.

Patch Set 1 #

Patch Set 2 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 4892f94182a5 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -6 lines) Patch
M src/Make.common View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/Makefile View 1 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 6
dfc
Hello adg (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
3 years, 2 months ago #1
rsc
sigh > There are other places in the distribution src/make.common for example > that could ...
3 years, 2 months ago #2
dfc
Added src/Make.common. Please take another look. Cheers Dave
3 years, 2 months ago #3
adg
LGTM
3 years, 2 months ago #4
adg
*** Submitted as 440678ea208a *** build: reduce the use of subshells in recursive make Using ...
3 years, 2 months ago #5
adg
3 years, 2 months ago #6
*** Submitted as http://code.google.com/p/go/source/detail?r=fa0771258ae1 ***

build: reduce the use of subshells in recursive make

Using make -C $* rather than (cd $* ; make) results in a small,
but measurable improvement in build times where compilation is
not the major component. eg.

before - ~/go/src/pkg$ time make
        real	0m1.176s
        user	0m0.639s
        sys	0m0.399s
after - ~/go/src/pkg$ time make
        real	0m0.916s
        user	0m0.571s
        sys	0m0.243s

There are other places in the distribution src/make.common for example
that could also benefit from this change.

R=adg
CC=golang-dev, rsc
http://codereview.appspot.com/4174055

Committer: Andrew Gerrand <adg@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1278:e6ce13d99bf5