rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.71k stars 285 forks source link

In 'focused' view, components still show up all on one page, causes hang #999

Closed jarohen closed 2 months ago

jarohen commented 10 months ago

Hey there :wave:

I've got a decent amount of components in my schema (~75), some of which are mutually recursive (no problem with the recursive rendering btw, works great :slightly_smiling_face:). Trouble is, when I select one component in the menu on the left, the UI hangs for ~10s trying to render them all.

Any way I can get these rendering one-to-a-page in 'focused' view? It seems like the operations go from all-on-one-page to one-to-a-page when I change the render mode from 'read' to 'focused', but the components don't?

Cheers!

James

wparad commented 10 months ago

I'm curious do other tools on https://openapi.tools/ also hang with your spec?

jarohen commented 10 months ago

Hey @wparad, I'll take a look :eyes:

It's an open-source spec, if that helps

James

jarohen commented 10 months ago

Other ones we've already tried:

jarohen commented 10 months ago

Elements from that list looks like it does the job for us - cheers for the pointer! :pray:

mrin9 commented 2 months ago

there are few ways you may address the issue. The goal is to reduce the DOM creation on the browser for that you can use the following

RapiDoc will dereference the OpenAPI spec if it contains refs inside it. but if you are dealing with a large spec. I would suggest

These will save some vital processing time on browser

RapiDoc do allow these operations to happen on the server-side so that the browser's performance is not affected. however then we aren't talking abt a free offering.