1

I have a project where I'm using the V8 JavaScript engine from Google. I also use Travis CI to build and deploy my project. The build often exceeds the maximum time limit (~45 min) and fails because of this. I have done the following to speed up the compile time for V8 (which made some difference):

  • Don't build tests
  • Disabled support for i18n

How could I speed up the compile time for V8 even more?

3
  • Can't you just use it as a library? Are you continually modifying it so you have to rebuild it? Commented Sep 28, 2016 at 20:45
  • I'm just using it as a library. How can I get the precompiled libs for v8? (I'm compiling for os x). Commented Sep 28, 2016 at 20:49
  • If you have the source, can't you create libraries yourself? Compile them to a library beforehand, and include them in your project instead? I don't program C++, so I have no clue to create them, but google tells me en.wikipedia.org/wiki/… -- sorry I can't help more. Commented Sep 28, 2016 at 21:46

2 Answers 2

1

I use V8 binary package from a PPA. in my .travis.yml file. It looks like this:

before_install:
  - sudo add-apt-repository ppa:pinepain/libv8-5.2 -y
  - sudo apt-get update -q
  - sudo apt-get install libv8-dev -y
Sign up to request clarification or add additional context in comments.

2 Comments

That looks really good! I want v8 version 4.9.385.33, can't find it there.
You can also see at github.com/pmed/v8pp/blob/master/build-v8.sh script. I used it before to build only V8 libraries on Travis, but haven't touch that script since switching to PPA.
1

I ended up using the built-in caching features in Travis CI. Time to compile went down from 45 min to 13 min. Happy! Thanks to the comments that pointed me in the right direction.

1 Comment

Care to explain exactly how you did it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.