Hacker News new | past | comments | ask | show | jobs | submit login
V8 JavaScript Engine: V8 Release 5.4 (v8project.blogspot.com)
126 points by okket on Sept 9, 2016 | hide | past | favorite | 19 comments



Wow! The new version of V8 "…reduces peak memory consumption of on-heap memory up to 40%." and reduces "…off-heap peak memory usage by up to 20%". As the author of a large Electron app that has huge implications downstream for our users. Great job!


Don't forget the "up to". Your app may be in another section of the statistics.


Glad to see someone point this out. "There are three kinds of lies: lies, damned lies, and statistics."


"In 5.4 we tuned V8’s garbage collector for low-memory devices with 512 MB RAM or less. Depending on the website displayed this reduces peak memory consumption of on-heap memory up to 40%."

It looks like this optimization is for low-memory devices which probably doesn't apply to what you are targeting with your Electron app.


Yes, exactly, this is targeting peak memory consumption, but doesn't mention anything about average memory consumption (which is probably what you would care about for your electron app).


It would be interesting to get feedback how much this helped Electron.

Keep in mind that this blog post is talking about V8 memory and not Chrome memory. The percentage for Chrome is obviously lower.


Does anyone know (roughly) how soon we can expect this?

I tried to tracking down what progress between versions looks like, but couldn't find anything solid in my few minutes of googling.


Given the post, it will officially be released when Chrome 54 goes out of beta, and there's roughly 6 weeks between Chrome releases too. So, expect it to be released about 4-8 weeks from now.


On that note, how quickly does Electron track new V8 releases?


You'll have to wait at least until Node.js V7 is out (~October, see comment down here). Could also take much longer till Electron decides to upgrade their internal Node.js.

https://github.com/electron/electron/tree/master/vendor -> node


Wonder how this will translate to resource usage in my node projects. Those memory reductions are significant.


Node v7 will be out sometime in October (and it will have this version of V8), so we'll find out soon enough.



This is great.. unable to check the api differences at work (google docs is blocked). Are there any ESnext features in this release? Eagerly awaiting async/await and class properties in the browser.


As a side note, is there a way to run this thing standalone as a headless browser?


V8 is just the JavaScript runtime, not a full browser environment (i.e., no DOM, etc.) If you want to use V8 headless, you can either use NodeJS or you can link it into your own C/C++ code to run JS scripts, which is what I did a while ago for a project that needed a scripting hook.

If you want to run a full browser environment headlessly, take a look at PhanthomJS or SlimerJS, or use one of the fake DOM thingies for Node.


V8 is not a browser. It's just a JavaScript engine. For a browser, you'd need a rendering engine and some networking code.

For a list of headless browsers, see [0]. Not all entries in that list run v8.

[0]: https://github.com/dhamaniasad/HeadlessBrowsers


Yes I know that, but what if all you want is just to execute the JavaScript on a page?


The catch is that usually, the JavaScript is on a page because it interacts with the page in some way. So without a DOM, executing the page's JS likely won't work.

Having said that: if you just want a headless V8 VM, Node.js is what you're looking for. You can even use jsdom there to simulate a web page if the JS you're trying to run requires it.

If you're looking for headless Chrome/Chromium (which includes V8), try nightmareJS.

Neither Node nor nightmare include V8 5.4, but they will in the relatively near future.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: