Reduce V8 size by eliminating unused features

207 views
Skip to first unread message

Tekman

unread,
Jan 29, 2021, 3:17:36 PM1/29/21
to v8-users
Hi,

Do you have any tips for reducing the size of an embedded V8 by removing unnecessary functionality (such as wasm or worker support)? Size on disk comes to mind since I presume runtime cost is already pay-for-play.

We're looking for a basic ES6 runtime environment that is compact and efficient (with JIT support), without any of the bells & whistles.

Thank you!

Ben Noordhuis

unread,
Jan 30, 2021, 5:48:56 AM1/30/21
to v8-users
Take a look at BUILD.gn, V8 has a veritable zoo of build options. The
two quickest wins are probably v8_enable_lite_mode=true and
v8_enable_i18n_support=false (drops the dependency on ICU, which is
_big_.)

Jakob Gruber

unread,
Feb 1, 2021, 1:31:58 AM2/1/21
to v8-u...@googlegroups.com, Clemens Backes
+Clemens Backes I know we'd discussed a flag to make wasm optional in the past, was there any progress?

--
--
v8-users mailing list
v8-u...@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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAHQurc-1pU92-OYo6cYQjxGwi0mr7FS2c2bWkiy5g8Un2v1SKw%40mail.gmail.com.

Clemens Backes

unread,
Feb 1, 2021, 8:49:57 AM2/1/21
to Jakob Gruber, v8-u...@googlegroups.com
Yep, the work to optionally strip out wasm is tracked in https://crbug.com/v8/11238. We have the gn arg now, but it does not reduce binary size yet. This will probably change until the end of this quarter. Follow the bug to get updates!
--

Clemens Backes

Software Engineer

clem...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.


This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages