Skip to content

ENH: Avoid repeated name normalization during matching - #461

Open
GibranAlfa wants to merge 3 commits into
equinor:mainfrom
GibranAlfa:speed-up-matching-comparison
Open

ENH: Avoid repeated name normalization during matching#461
GibranAlfa wants to merge 3 commits into
equinor:mainfrom
GibranAlfa:speed-up-matching-comparison

Conversation

@GibranAlfa

@GibranAlfa GibranAlfa commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Resolves #460

Normalize each source and target name once per matching request, then use RapidFuzz extraction to calculate scores and select the top three matches.

Time to compare 1550 wells is reduced from 159 seconds to 220 miliseconds 🤯.

Checklist

  • Tests added (if not, comment why)
  • Test coverage equal or up from main (run pytest with --cov=src/ --cov-report term-missing)
  • If not squash merging, every commit passes tests
  • Appropriate commit prefix and precise commit message used
  • All debug prints and unnecessary comments removed
  • Docstrings are correct and updated
  • Documentation is updated, if necessary
  • Latest main rebased/merged into branch
  • Added comments on this PR where appropriate to help reviewers
  • Moved issue status on project board
  • Checked the boxes in this checklist ✅

@GibranAlfa
GibranAlfa force-pushed the speed-up-matching-comparison branch from 8031d35 to c5e0747 Compare August 24, 2026 13:21
@GibranAlfa
GibranAlfa requested review from slangeveld and tnatt August 24, 2026 13:22
@GibranAlfa GibranAlfa self-assigned this Aug 24, 2026
@GibranAlfa GibranAlfa added the enhancement New feature or request label Aug 24, 2026

@tnatt tnatt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice speedup 🥳
I just have some comments regarding tests - I feel like we might not test too many variants of different strings. Probably worth adding some more.

Comment thread src/fmu_settings_api/services/match.py
@GibranAlfa
GibranAlfa force-pushed the speed-up-matching-comparison branch from 514d479 to 559f97e Compare August 26, 2026 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Avoid repeated name normalization during matching

2 participants