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

Issue 2043623002: luci-go: Tools for working with BSD style ar archives. (Closed)

Created:
4 years, 6 months ago by mithro
Modified:
3 years, 6 months ago
CC:
chromium-reviews, infra-reviews+luci-go_chromium.org, tandrii+luci-go_chromium.org
Base URL:
https://github.com/luci/luci-go@master
Target Ref:
refs/heads/master
Project:
luci-go
Visibility:
Public.

Description

luci-go: Tools for working with BSD style ar archives. ar archives are the simplest format that satisfies the following criteria; * Is an existing standard which has tools which ship on standard Linux systems. * Requires no escaping / processing of file contents. * Header can be written without needing to understand the whole file. * Extremely fast to process / generate. Other formats which were consider before selecting the ar format; * tar * zip * cpio * rar * Something protobuf based. On a z620, these ar versions are ~5 times faster than the archive/tar equivalent which ships with go. There are a couple of drawbacks; * The ar format doesn't support special files or symlinks. * The Linux ar tool don't extract with directory paths (list fine). The Python version of this code is at https://codereview.chromium.org/2049523004 This was split out of https://codereview.chromium.org/2014243002 * https://github.com/luci/luci-go/issues/9 * https://crbug.com/598990 BUG=598990

Patch Set 1 #

Total comments: 24

Patch Set 2 : Fixing maruel's comments. #

Patch Set 3 : Fixes. #

Total comments: 42

Patch Set 4 : Fixing for maruel's review. #

Total comments: 74

Patch Set 5 : Fixing for maruel's review + reader rewrite. #

Patch Set 6 : Latest fixes. #

Total comments: 17

Patch Set 7 : Lots of fixes. #

Patch Set 8 : Small update to a comment. #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+942 lines, -2 lines) Patch
A common/archive/ar/ar_test.go View 1 2 3 4 5 6 1 chunk +340 lines, -0 lines 0 comments Download
A common/archive/ar/doc.go View 1 2 3 4 5 6 7 1 chunk +15 lines, -0 lines 0 comments Download
A common/archive/ar/errors.go View 1 2 3 4 5 6 1 chunk +46 lines, -0 lines 2 comments Download
A common/archive/ar/reader.go View 1 2 3 4 5 6 1 chunk +219 lines, -0 lines 2 comments Download
A common/archive/ar/writer.go View 1 2 3 4 5 6 1 chunk +319 lines, -0 lines 6 comments Download
A + common/archive/doc.go View 1 2 3 4 5 6 1 chunk +3 lines, -2 lines 1 comment Download

Messages

Total messages: 25 (9 generated)
mithro
Hi Marc, This is the first CL of three CLs being split out of the ...
4 years, 6 months ago (2016-06-06 07:42:35 UTC) #2
tandrii_google
You can add me(tandrii@) for these reviews as well. Before I go for full review ...
4 years, 6 months ago (2016-06-06 08:38:01 UTC) #4
mithro
On 2016/06/06 at 08:38:01, tandrii wrote: > You can add me(tandrii@) for these reviews as ...
4 years, 6 months ago (2016-06-06 16:39:19 UTC) #5
M-A Ruel
Just general styling comment, will do a more careful review a bit later. https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go File ...
4 years, 6 months ago (2016-06-06 23:01:05 UTC) #7
mithro
Hi Maruel, I've made the changes you requested. Tim 'mithro' Ansell https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go File common/archive/ar/ar_test.go (right): ...
4 years, 6 months ago (2016-06-07 12:28:52 UTC) #9
M-A Ruel
https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go File common/archive/ar/ar_test.go (right): https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go#newcode76 common/archive/ar/ar_test.go:76: if g, e := h.Name(), "filename1"; g != e ...
4 years, 6 months ago (2016-06-08 20:25:32 UTC) #11
mithro
Hi Maruel, I think I got all your comments. I'm going to wait to submit ...
4 years, 6 months ago (2016-06-10 10:09:53 UTC) #12
M-A Ruel
https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go File common/archive/ar/ar_test.go (right): https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go#newcode76 common/archive/ar/ar_test.go:76: if g, e := h.Name(), "filename1"; g != e ...
4 years, 6 months ago (2016-06-10 17:51:11 UTC) #13
Vadim Sh.
https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go File common/archive/ar/ar_test.go (right): https://codereview.chromium.org/2043623002/diff/1/common/archive/ar/ar_test.go#newcode76 common/archive/ar/ar_test.go:76: if g, e := h.Name(), "filename1"; g != e ...
4 years, 6 months ago (2016-06-10 18:00:10 UTC) #15
mithro
Hi Marc, Lots of changes in this update. I asked around about the correct way ...
4 years, 6 months ago (2016-06-14 10:57:53 UTC) #16
M-A Ruel
Change looks pretty good. Small things. On 2016/06/14 10:57:53, mithro wrote: > I asked around ...
4 years, 6 months ago (2016-06-14 14:30:43 UTC) #17
mithro
Hi! Adding Michael and Dave to review this go code and advice on the API. ...
4 years, 1 month ago (2016-11-06 22:56:53 UTC) #20
mcgreevy
I've mostly looked at the ar package API so far, rather than the implementation details. ...
4 years, 1 month ago (2016-11-07 00:37:22 UTC) #22
mcgreevy
https://codereview.chromium.org/2043623002/diff/160001/common/archive/ar/writer.go File common/archive/ar/writer.go (right): https://codereview.chromium.org/2043623002/diff/160001/common/archive/ar/writer.go#newcode182 common/archive/ar/writer.go:182: func (aw *Writer) ReaderFrom(r io.Reader) (int64, Error) { On ...
4 years, 1 month ago (2016-11-07 11:10:20 UTC) #23
mcgreevy
Re: your commit message: "these ar versions are ~5 times faster than the archive/tar equivalent ...
4 years, 1 month ago (2016-11-08 00:29:16 UTC) #24
M-A Ruel
4 years, 1 month ago (2016-11-08 00:43:07 UTC) #25
On 2016/11/08 00:29:16, mcgreevy2 wrote:
> Re: your commit message:
> 
> "these ar versions are ~5 times faster than the archive/tar
> equivalent which ships with go."
> 
> Do you mean that the code in this CL is ~5 times faster than archive/tar?  How
> did you measure that?
> 
> How significant is this time with respect to the time it takes to
> upload/download the results?  It would be great if we could get away with
using
> archive/tar instead of maintaining extra code.

You can get this via a profile:
$ isolate archive -help
$ isolate archive -isolate-server=fake -trace foo.json ...

then you can load foo.json into chrome://tracing and visualize the relative
times.

Powered by Google App Engine
This is Rietveld 408576698