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

Issue 7066048: Compress sources of JS libraries in addition to the snapshot. (Closed)

Created:
9 years, 6 months ago by mnaganov (inactive)
Modified:
9 years, 6 months ago
CC:
v8-dev, Satish
Visibility:
Public.

Description

Compress sources of JS libraries in addition to the snapshot. This saves ~170K on current sources. R=sgjesse@chromium.org BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8189

Patch Set 1 #

Total comments: 21

Patch Set 2 : Comments addressed #

Total comments: 2

Patch Set 3 : Make decompressor class public #

Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -97 lines) Patch
M include/v8.h View 1 2 2 chunks +29 lines, -0 lines 0 comments Download
M samples/shell.cc View 1 2 3 chunks +34 lines, -29 lines 0 comments Download
M src/SConscript View 1 2 2 chunks +12 lines, -3 lines 0 comments Download
M src/api.cc View 1 2 5 chunks +72 lines, -0 lines 0 comments Download
M src/bootstrapper.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 3 chunks +9 lines, -5 lines 0 comments Download
M src/d8.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mksnapshot.cc View 1 2 3 chunks +35 lines, -0 lines 0 comments Download
M src/natives.h View 1 1 chunk +4 lines, -1 line 0 comments Download
M src/serialize.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M tools/gyp/v8.gyp View 2 3 chunks +3 lines, -1 line 0 comments Download
M tools/js2c.py View 1 9 chunks +83 lines, -52 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
mnaganov (inactive)
9 years, 6 months ago (2011-06-02 11:17:28 UTC) #1
mnaganov (inactive)
+vitalyr
9 years, 6 months ago (2011-06-06 09:01:43 UTC) #2
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/7066048/diff/1/src/mksnapshot.cc File src/mksnapshot.cc (right): http://codereview.chromium.org/7066048/diff/1/src/mksnapshot.cc#newcode322 src/mksnapshot.cc:322: #ifdef COMPRESS_STARTUP_DATA_BZ2 Can't we use the normal V8 ...
9 years, 6 months ago (2011-06-06 09:21:58 UTC) #3
Søren Thygesen Gjesse
LGTM http://codereview.chromium.org/7066048/diff/1/src/mksnapshot.cc File src/mksnapshot.cc (right): http://codereview.chromium.org/7066048/diff/1/src/mksnapshot.cc#newcode322 src/mksnapshot.cc:322: #ifdef COMPRESS_STARTUP_DATA_BZ2 Can't we use the normal V8 ...
9 years, 6 months ago (2011-06-06 09:21:59 UTC) #4
Vitaly Repeshko
http://codereview.chromium.org/7066048/diff/1/samples/shell.cc File samples/shell.cc (right): http://codereview.chromium.org/7066048/diff/1/samples/shell.cc#newcode314 samples/shell.cc:314: if (compressed_data[i].compressed_size != 0) { When does this happen? ...
9 years, 6 months ago (2011-06-06 10:08:23 UTC) #5
mnaganov (inactive)
Comments addressed, please take another look. BTW, compressing concatenated sources gives us another ~10K size ...
9 years, 6 months ago (2011-06-06 13:40:18 UTC) #6
mnaganov (inactive)
+satish
9 years, 6 months ago (2011-06-06 13:41:50 UTC) #7
Søren Thygesen Gjesse
LGTM
9 years, 6 months ago (2011-06-06 14:30:56 UTC) #8
Vitaly Repeshko
http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc File samples/shell.cc (right): http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc#newcode312 samples/shell.cc:312: BZip2Decompressor startup_data_decompressor; It seems unfortunate that the shell sample ...
9 years, 6 months ago (2011-06-06 15:59:15 UTC) #9
mnaganov (inactive)
A good idea! I've introduced a base class StartupDataDecompressor in the V8 API that calls ...
9 years, 6 months ago (2011-06-06 20:37:37 UTC) #10
Søren Thygesen Gjesse
9 years, 6 months ago (2011-06-07 05:53:25 UTC) #11
On 2011/06/06 20:37:37, Mikhail Naganov (Chromium) wrote:
> A good idea!
> 
> I've introduced a base class StartupDataDecompressor in the V8 API that calls
> API functions in the right sequence. An embedder only needs to subclass from
it
> and provide the decompressing function. This is what I'm doing in shell.cc and
> mksnapshot.cc. A little code duplication has emerged between them, but I think
> this is acceptable.
> 
> On 2011/06/06 15:59:15, Vitaly Repeshko wrote:
> > http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc
> > File samples/shell.cc (right):
> > 
> > http://codereview.chromium.org/7066048/diff/7001/samples/shell.cc#newcode312
> > samples/shell.cc:312: BZip2Decompressor startup_data_decompressor;
> > It seems unfortunate that the shell sample is using something that looks
like
> > internal code to demonstrate the compression feature. Could you document
that
> > it's safe to use its implementation details? Or how about we expose a
> documented
> > convenience API DecompressWithCallback?
> > 
> > http://codereview.chromium.org/7066048/diff/7001/src/bz2-decompress.h
> > File src/bz2-decompress.h (right):
> > 
> >
>
http://codereview.chromium.org/7066048/diff/7001/src/bz2-decompress.h#newcode31
> > src/bz2-decompress.h:31: class BZip2Decompressor {
> > This should be some namespace and should be documented.

Should we add support for compressed startupdata to d8 as well?

Powered by Google App Engine
This is Rietveld 408576698