Reputation: 1003
My application in Node.js has performance tests that are run several times. Partway through execution speed drops to half the original value:
RUN 1: 6604 ms
RUN 2: 6404 ms
RUN 3: 6386 ms
RUN 4: 6392 ms
RUN 5: 12755 ms
RUN 6: 12977 ms
RUN 7: 13124 ms
Insignificant changes to the code can push this cliff forwards or backwards, but I can't figure out what the trigger is.
Does anyone recognize the fingerprint of this issue?
I apologize for being unable to provide a minimal example, the issue only started to surface once the application crossed the 4,000 line mark. And the issue disappears once the application is trimmed back to below 4,000 lines.
Edit: The same test when run in Debian shows an even more dramatic cliff. Performance drops sharply from 8424 ms to 45212 ms.
Upvotes: 0
Views: 85
Reputation: 1003
I found the answer. This is an issue with the version of V8 used by the current version of Node. As of v9.0.0-nightly20170607eef94a8bf8/ 07-Jun-2017 20:00
this issue disappears due to a new version of V8 having landed.
To summarize: it's a previously unknown bug in Node.js, but one that's already fixed in the nightlies and will be released as version 9.
Upvotes: 1