⚡ Optimize fuzzy clustering with Web Worker and fix logic #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Optimized the fuzzy clustering feature in
NormalizationModalby moving the quadratic complexity calculation to a Web Worker (src/workers/clusteringWorker.ts). This prevents the UI from freezing during analysis of large datasets (e.g., 10k items).Additionally, corrected the clustering logic to accommodate
fuzzysortv3+, which returns positive scores (0..1) instead of negative scores. The previous negative thresholds were ineffective, potentially causing incorrect results. Implemented a dynamic positive threshold based on string length to maintain the original intent of "stricter matching for shorter strings".Benchmark: Processing 10k items takes ~6.5s (blocking main thread previously, now backgrounded). Correctness improved by stricter filtering.
PR created automatically by Jules for task 14630253936315555000 started by @lightmyfireadmin