-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Slow search for big swagger file #1109
Comments
same here, we have a large API to document and the search is painfully slow (so is the loading). Pointers on where/what to look for would be great because as it stands we have no idea how to fix/contribute to solve this issue. |
it does look like all the components are being instantiated ? as if there was no lazy loading so all the content is being generated at first load. |
This happens in the moment when scrollbar is rendered. This looks to cause major relayout by browser. One of the reasons is the number of elements on the page. I will investigate it further when I have time. |
This is a really painful problem. It renders the whole site pretty much unusable. I just fixed a similar issue in a similar (related even, considering how similar the code looks?) project and now I need to get it fixed here. There I fixed it by delaying highlighting and re-rendering until the user stops typing. At least it makes everything usable, so the user can finish typing first, and browser has one unnoticeable pause, and not just hangs completely. I paste the patch verbatim:
I investigated this project, and the search handling looks very similar, but there are these react parts, so I'm not sure if this is going to work. I'm not really a fronted dev, so I would appreciate some help. :) |
Hi @RomanHotsiy . Just noticed you've landed a fix and I reaaaaly appreciate it! 🎉 I can confirm that it does make things significantly better. The site I'm testing went from unusable to quite OK. However it is still somewhat slow while typing. While investigating using Chrome performance tuner, I can see that it is mostly sitting in rendering. Relevant screenshot - while I'm typing it sits here pretty much at all times. I'm quite sure it's the change of highlighting on this huge page that is taking so much time. Just trying to be helpful. I know this is an Open Source project, so no pressure. Thanks for improving it! |
We face a performance issues related to the search provided by ReDoc. After entering 3 characters website is frozen for few seconds, also the search results are displayed after few seconds.
Is there any way to improve it? I didn't find any search configuration that I would be able to change.
We use ReDoc v2.0.0-rc.18, you can check how it works for us here: http://api-documentation.relayr.io/
The text was updated successfully, but these errors were encountered: