Skip to content

Performance issue in NodeJS >= 10.0.0 #27667

Closed
@hellivan

Description

@hellivan

Not sure if this is the right place but I may have found a possible performance issue in NodeJS JavaScript execution.
While execution of this example script on a NodeJS runtime <10.0.0 runs smoothly, it freezes on NodeJS runtimes >= 10.0.0 for an indefinite amount of time.
I tested the script for all latest major releases of NodeJS and got the following results:

  • 8.16.0: Runs smoothly
  • 9.11.2: Runs smoothly
  • 10.0.0: Freeze
  • 10.15.3: Freeze
  • 11.15.0: Freeze
  • 12.2.0: Freeze

I tested the script on different machines (including windows hosts), always getting the same result.
Due to the facts that the example-script is a pure JavaScript file with no dependencies on any NodeJS or external modules, and that the issue occurred first in NodeJS version 10.0.0 I assume that it has to do something with the upgrade of V8 Runtime from 6.2 to 6.6, which was listed in the changelog ov NodeJS version 10.0.0.

NB: I discovered this issue after upgrading a service to newest NodeJS runtime. The service is responsible for validating arbitrary Data against a defined JSONSchema. Validation is implemented using an external library called AJV. After the update, the service started to freeze sporadically during validation process. The provided example script therefore contains an example of a validation function generated by AJV library and some sample data (array of 1000 elements) for which validation will freeze after some time (on my machine, depending on NodeJs version at element no ~594 or no ~610).

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.performanceIssues and PRs related to the performance of Node.js.v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions