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

Resolving large files never finishes #394

Closed
postatum opened this issue Nov 14, 2019 · 2 comments
Closed

Resolving large files never finishes #394

postatum opened this issue Nov 14, 2019 · 2 comments

Comments

@postatum
Copy link
Contributor

Consider this issue raml-org/webapi-parser#56.

The code I used to test:

const amf = require('amf-client-js')

async function main () {
  const hrstart = process.hrtime();

  await amf.AMF.init()
  const model = await amf.AMF.raml10Parser().parseFileAsync(
    `file:///Downloads/commercetools-api-reference/api.raml`)
  console.log('parsed', process.hrtime(hrstart))

  const resolved = await amf.AMF.resolveRaml10(model)
  console.log('resolved', process.hrtime(hrstart))
}

main()

On my machine parsing takes about 15 seconds but resolution works for 10 minutes and does not finish.

@tomsfernandez
Copy link
Contributor

tomsfernandez commented Jun 5, 2020

Hi @postatum. I have tested this API in AMFs most recent version (4.1.2 JS) and it has improved dramatically since the time you tested it. The times were:

  • Parsing: 7 seconds
  • Resolution: 155 seconds (2 minutes 30 seconds)

The test was conducted with Node 13.1.0.

@tomsfernandez
Copy link
Contributor

I'm closing this issue as the time it takes to resolve the API has improved a lot given it's complexity (it is a very big and complex API with lots of resource types to be applied)

@bulju bulju transferred this issue from another repository Jul 13, 2020
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