Skip to content
This repository has been archived by the owner on Aug 14, 2021. It is now read-only.

Search takes too long for big index files #117

Closed
15202-sidorov opened this issue Oct 30, 2020 · 4 comments
Closed

Search takes too long for big index files #117

15202-sidorov opened this issue Oct 30, 2020 · 4 comments

Comments

@15202-sidorov
Copy link

I have a rather big index file (around 23.5 MB) and when I try to make a simple search, it takes too long to load any results. Sometimes the page is stuck completely for a minute and sometimes it can take 10 seconds to complete the search. Is there a way to descrease the search time for such a big index file? It is definatly not a networking issue, such thing happens when the index file is completely loaded.

@Gerrit0
Copy link
Contributor

Gerrit0 commented Oct 30, 2020

The default themes don't load the search index until you click in the search box - so I suspect that network latency might still be (part of) the problem here. I always thought this was a strange design choice, but haven't gotten around to figuring out why and making it load earlier.

As for improving the search algorithm - we use lunr for that... there might be some settings that I'm not aware of.

@IliaSidorovINT
Copy link
Contributor

Since we don't really need a fuzzy search, we have been able to remove it and it really improved the perfomance too. Is there any way that we can make the fuzzy search optional? I've been thinking about adding a config file in assets near the search.json and describing options in there. @Gerrit0 Can you suggest something?

@Gerrit0
Copy link
Contributor

Gerrit0 commented Nov 26, 2020

I am open to pretty much any changes to how search works. I'd like for the behavior to be consistent across all typedoc generated docs, so I think it might be better to completely drop fuzzy searching. For smaller projects, it doesn't really matter... and if it is causing performance issues with large projects, I'm fine with turning it off.

I don't have a large enough project to really experiment with this myself... TypeDoc's generated docs are way smaller than what you are having issues with. Is your project open source?

@IliaSidorovINT
Copy link
Contributor

No, unfortunatly our project is not open source.

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

No branches or pull requests

3 participants