krisk / Fuse

Lightweight fuzzy-search, in JavaScript
https://fusejs.io/
Apache License 2.0
18.05k stars 766 forks source link

Suggestions to reduce CPU usage? #478

Closed daviddean99 closed 3 years ago

daviddean99 commented 4 years ago

Fuse is fantastic, I love it's simplicity and functionality!

My challenge is that I'm trying to use Fuse on serverless (Cloudflare Workers) where the CPU is constrained.

Do you have any suggestions / tips on optimisations or config options to reduce the CPU overhead of searching?

My dataset consists of a single array with ~60k entries. All text of varying lengths. Examples:

"Business Development Executive"
"Business Development Officer"
"Business Enterprise Officer"
"Business Executive"

These are my config options:

includeScore: false,
isCaseSensitive: false,
includeMatches: false,
minMatchCharLength: 5,
shouldSort: true,
threshold: 0,
findAllMatches: true,
ignoreLocation: true

I'm loading an existing index file to avoid the CPU overhead of rendering it.

Thanks.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days