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

Issue 95040044: code review 95040044: cmd/pack: buffer writes in TestLargeDefs (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by ality
Modified:
10 years, 4 months ago
Reviewers:
r, iant
CC:
golang-codereviews, iant
Visibility:
Public.

Description

cmd/pack: buffer writes in TestLargeDefs TestLargeDefs was issuing over one million small writes to create a 7MB file (large.go). This is quite slow on Plan 9 since our disk file systems aren't very fast and they're usually accessed over the network. Buffering the writes makes the test about six times faster. Even on Linux, it's about 1.5 times faster. Here are the results on a slow Plan 9 machine: Before: % ./pack.test -test.v -test.run TestLargeDefs === RUN TestLargeDefs --- PASS: TestLargeDefs (125.11 seconds) PASS After: % ./pack.test -test.v -test.run TestLargeDefs === RUN TestLargeDefs --- PASS: TestLargeDefs (20.835 seconds) PASS

Patch Set 1 #

Patch Set 2 : diff -r 969a38842696 https://code.google.com/p/go #

Patch Set 3 : diff -r 969a38842696 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M src/cmd/pack/pack_test.go View 1 3 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 3
ality
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years, 4 months ago (2014-05-05 22:41:19 UTC) #1
iant
LGTM
10 years, 4 months ago (2014-05-05 23:49:30 UTC) #2
r
10 years, 4 months ago (2014-05-16 03:12:27 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=c288f784f984 ***

cmd/pack: buffer writes in TestLargeDefs

TestLargeDefs was issuing over one million small writes to
create a 7MB file (large.go). This is quite slow on Plan 9
since our disk file systems aren't very fast and they're
usually accessed over the network.

Buffering the writes makes the test about six times faster.
Even on Linux, it's about 1.5 times faster.

Here are the results on a slow Plan 9 machine:

Before:
        % ./pack.test -test.v -test.run TestLargeDefs
        === RUN TestLargeDefs
        --- PASS: TestLargeDefs (125.11 seconds)
        PASS

After:
        % ./pack.test -test.v -test.run TestLargeDefs
        === RUN TestLargeDefs
        --- PASS: TestLargeDefs (20.835 seconds)
        PASS

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://codereview.appspot.com/95040044

Committer: Rob Pike <r@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b