-
Notifications
You must be signed in to change notification settings - Fork 377
Closed
Description
Describe the bug
Following APIDevTools/json-schema-ref-parser#211 by the amazing @P0lip everything was neat and nice running Prism 4.1.2.
We recently tried to bump to 4.3.1 but discovered a similar performance regression while running getHttpOperationsFromSpec()
To Reproduce
A complete standalone repro case is available at https://github.com/nulltoken/prism_repro
Running yarn repro
against
- nulltoken/prism_repro@e5c7c23 (prism 4.1.2 + json-schema-ref-parser bugfix) shows the following output
$ yarn repro
yarn run v1.22.5
$ yarn node -r ts-node/register --unhandled-rejections=strict ./src/repro.ts
Running prism v4.1.2
Converting to Prism format: 330.432ms
Number of processed (basic) endpoints 600
Done in 4.71s.
- nulltoken/prism_repro@6ef765b (prism 4.3.1) shows the following output
$ yarn repro
yarn run v1.22.5
$ yarn node -r ts-node/register --unhandled-rejections=strict ./src/repro.ts
Running prism v4.3.1
Converting to Prism format: 27.135s
Number of processed (basic) endpoints 600
Done in 31.13s.
Expected behavior
Jumping from 330ms to 27s when processing the same file looks a bit much, doesn't it? 😉
Getting back to 330ms would be great.
And maybe adding a unit test to protect this method from suffering from new potential performance related regressions in the future ?
/cc @chohmann
Metadata
Metadata
Assignees
Labels
No labels