Coder Social home page Coder Social logo

Comments (2)

wokste avatar wokste commented on June 21, 2024

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?

from flipper.

Zeks avatar Zeks commented on June 21, 2024
  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

from flipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.