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

Word search is too slow on "no fandom" search #20

Closed
Zeks opened this issue Jun 25, 2018 · 2 comments
Closed

Word search is too slow on "no fandom" search #20

Zeks opened this issue Jun 25, 2018 · 2 comments

Comments

@Zeks
Copy link
Owner

Zeks commented Jun 25, 2018

Either I will need to disable this combination or improve word search perfomance

@Zeks Zeks changed the title Word serach is to slow on"no fandom" search Word search is too slow on "no fandom" search Jun 25, 2018
@wokste
Copy link

wokste commented Jun 26, 2018

Options for slow processes that I think of in the moment:

  1. Add indexes. (This might be difficult IMHO)
  2. Asynchronous code. Basically, keep the UI responsive while a tread is looking for certain words. Cancel query if people type extra letters, etc.
  3. Cache results.
  4. Precalculate stuff. E.g. a table with an index on word and a foreign key to fics with that world in the title.

Basically, if google can search trough billions of pages in a few milliseconds, you can also make a reasonable fast search. Right?

@Zeks
Copy link
Owner Author

Zeks commented Jun 26, 2018

  1. Adding a FTS table for title and summary is an option but heavily out of scope for what I am currently trying to do. And I am not sure it's going to help (much).
  2. Nope. Allowing users to operate on the app while it's already doing its primary function can only lead to more problems. And if I disable all the relevant UI to make sure they don't click search again then asynchronicity becomes pointless.
  3. Can't. My server is going to to do things quite a bit differently from others of this kind as in: every query will take into account ignored fics and ignored fandoms per user That, and
  4. Per-word table might sound like a good idea but the database already has over 2 millions fanfic entries and it's only going to grow.

So... I think I will just defer solving of this task to the time where I jump to in-memory database instead of fiel system one. It's not like flipper currently has problems doing word searches when at least a fandom is selected

@Zeks Zeks closed this as completed Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants