Hacker News new | past | comments | ask | show | jobs | submit | ofrobots's comments login

It made the back button useless for me.


I didn't experience that using Chrome. What browser are you using?


Happened to me with Chrome on OS/X - no way back!


Chrome on Android for me. Had to close the tab.


I had this problem in Chrome on linux.


Same with Firefox on Android.


Recent versions of Chrome DevTools have a new profiling feature called 'Record allocation profile' that may help. Enable this around a few of the sawtooth and it will give you a profile based on a sampling of allocations that happen during that period. The profile will include the stack-trace at the time of the allocation which should help you figure out where the allocations are coming from.


Thanks, this view looks really interesting and I hadn't looked at it deeply.

With that said, do you have any advice on how to use it in practice? Timeline profiles tell me my app goes through maybe 5MB of heap per second, but when I use this feature for say, 5 seconds, it tends to report 2-3 functions as having allocated 16kb each. (And if I run it again, I get similar results but with a different 2-3 functions.) Is it just reporting a very small subset of allocations?


This profiler is sampling based. It takes a sample once every 512KiB allocated (on average, randomized) and reports all the allocations still alive at the end of the interval. So, yes it reports the subset of allocations that are sampled and are 'leaking' from the interval. In that sense it is better at finding memory leaks.

If you want to look at all the allocations during the interval, then you can use the 'Allocation timeline' profile – this will give you all the allocations but note that this might have significant overhead.


Thanks for the info. Is there a way to get the Allocation timeline to report about all allocations though? It seems to only report objects that are uncollected (that show up as blue in the timeline). That's useful for finding true leaks, but in my case (trying to fix a sawtooth pattern of heap usage), stuff that was allocated and then quickly GC'ed is exactly what I want to know about. Or am I looking in the wrong place?


The plan is for a Node.js 6.0 release on Tuesday: https://github.com/nodejs/node/issues/5766#issuecomment-1983.... This would include V8 5.0.


Wow, that's soon, thanks!


To be precise, Node.js 6.x will include V8 5.0. There has been a little discussion on being able to include V8 5.1 down the road, maybe, but there is nothing concrete on it at this point.

Also, the fate for tail-call-elimination is pretty uncertain at the moment; see: https://github.com/tc39/proposal-ptc-syntax


Oh hi, fancy seeing you here :]

Note that ptc syntax _ensures_ tail calls, tail calls themselves have _already_ been approved in ES2015 and are live in V8 (under a flag), you can follow their status here: https://bugs.chromium.org/p/v8/issues/detail?id=4698


:( I was looking forward to tail calls.

As far as I can see WebKit/Safari is the only major browser that has an implementation: https://kangax.github.io/compat-table/es6/#test-proper_tail_...


> 1 line of COBOL

Offtopic, but this would be quite a challenge.


Never use a single workload as a predictor of performance of the universe of all other workloads. The best benchmark is not a benchmark at all – it is your actual workload.


This is not really accurate. Arrow functions shipped in Chrome on Tuesday (Sep 1) with Chrome 45 (V8 4.5).


Gotcha. I guess marking them "shipped" just puts them into canary? That was done a while back.

https://code.google.com/p/v8/issues/detail?id=2700


V8 has had arrow functions for a long time, but until recently they were not fully spec compliant. That is also why iojs put them behind a flag (separate from the flag that enabled stable harmony features).


Yeah, 'ship' means different things in different contexts. In the context of your original comment, node stable is getting arrow functions within a week of Chrome stable getting them.

In general, io.js has been very good at picking up stable V8 soon after it ships in Chrome. The exception was V8 4.3, which was not picked up because of API compatibility issues.

This is not a problem for Chrome because chrome doesn't expose the V8 C++ API to large body of third party module writers like Node does. It takes time to deal with some API changes.


Congrats on the public announce of your 'secret' project! When do you release the code publicly? It would be great to be able to hack on it again.


One of the key parts of this project is that we are using the code in production. Each piece is being used in our shipping releases like Java.

Open sourcing will happen. Doing it right is very important to us however, so we don't know when.


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: