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

Several optimizations #737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Commits on Jun 17, 2024

  1. Several optimizations

    I've been profiling orama, since it's taking 4s to ingest around 4k
    documents on my project and I would like to lower this down. I've
    noticed several things: It's ingesting a large amount of empty strings
    which is useless CPU time and also it's recalculating ids redundantly.
    This commit tries to address this two issues.
    
    Additionally, I've noticed that due to the async APIs, the code is
    spending most of it's time waiting for "run microtasks". I have no idea
    if it would be possible to compile those away, because right now it
    makes the default implementation much worse (performance-wise) in
    order for people to be able to provide their storage solution.
    
    Lastly, I've also noticed that providing the ID of the document, makes
    the ID be stored as part of the document properties. I thought it would
    only be to replace the default orama ID. I will fix this myself in
    userland by using `getDocumentProperties`, but perhaps is good to either
    change this default or document it.
    masylum committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    cd644de View commit details
    Browse the repository at this point in the history