Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed slowdown on swagger.json generation #808

Open
opjarretop opened this issue Jun 14, 2023 · 2 comments
Open

Speed slowdown on swagger.json generation #808

opjarretop opened this issue Jun 14, 2023 · 2 comments

Comments

@opjarretop
Copy link

opjarretop commented Jun 14, 2023

Issue

Environment

npx envinfo --npmPackages '*hapi*' --binaries

Binaries:
Node: 18.16.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.7.1 - /usr/local/bin/npm
Watchman: 2023.02.20.00 - /opt/homebrew/bin/watchman
npmPackages:
hapi-auth-jwt2: 10.4.0 => 10.4.0
hapi-swagger: 16.0.1 => 15.0.0
(paste the output of the command here)

Steps to Reproduce

Its hard to say. I wanted to post here incase this was already known. Essentially We use hapi-swagger to generate our swagger json. Recently I upgraded hapi-swagger from 15.0.0 to 16.0.1. We have our environments generating the swagger json when navigating to /swagger.json. This all works but I noticed the time it takes now when hitting the url (or hitting the /swagger.json route via api call is about 30% slower in 16.x with no other changes other than upgrading this package. This dependency was updated in isolation so I am fairly confident the change lies in here but it's hard to say where the issue may be. If this isnt the right forum please let me know.

(describe your issue here, include example route or joi schemas)

const server.routes({...})

Expected Behavior

(write what you thought would happen)

Actual Behavior

(write what happened)

Reproducible Demo

Ill try and work on one. But its possible if you just use console.time benchmarking on a call to the generated swagger via this library you'd see the speed diff.

@robmcguinness
Copy link
Collaborator

If you could provide working example with problem it would really help out for analysis

@opjarretop
Copy link
Author

@robmcguinness Ill work on one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants