On Thu, Dec 14, 2017 at 10:39 AM, <uzair.jal...@samsung.com> wrote:

> On Thursday, December 14, 2017 at 2:44:15 PM UTC+5:30, Ben Noordhuis wrote:
>>
>> On Thu, Dec 14, 2017 at 7:22 AM,  <uzair....@samsung.com> wrote:
>> > 1) How is snapshot_blob.bin generated at compile time ? (If possible
>> where
>> > in chromium code )
>>
>> Look for a file called mksnapshot.cc in v8/src/snapshot.
>>
>> > 2) Is it possible to reduce the size of snapshot_blob.bin ? (if yes
>> where in
>> > chromium code do we do it and will it have any performance regression
>> ?)
>>
>> You could disable internationalization (v8_enable_i18n_support=0) but
>> that's about it.  It won't affect performance but the Intl JS object
>> will have only bare-bones functionality.
>>
>> You can disable the snapshot entirely (v8_use_snapshot=0) but that
>> does have a performance impact because it shifts the cost of
>> construction to Context::New().  Expect that function to slow down by
>> 5-10x.
>>
>
> Hi Ben,
>
> Thanks for the reply :)
>
> We disabled  v8_enable_i18n_support and size of snapshot_blob.bin has
> reduced by 20KB.
>
> But is there any way to find out the reason for increase ?
>

There's a bunch of reasons, but mainly:

* new functionality (both internal and new language additions);
* and the increasing use of CodeStubAssembler
<https://v8project.blogspot.de/2017/11/csa.html> to write shipped code (vs.
implementing builtins
  as self-hosted JS, shipping the source files and compiling at runtime).

> Our current aim is to reduce the size of binary.

I suppose this is the binary in decompressed form, and not something like
an APK? It'd theoretically
be possible to support loading from compressed snapshot blobs (for roughly
1MB savings), but this
is not implemented currently.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to