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

Fix DB.find slowness when searching with regexes #1271

Conversation

mrichards30
Copy link
Contributor

@mrichards30 mrichards30 commented Jul 13, 2024

edit I messed this branch up I'm closing this and opening a different one with the commits cherry picked on

Currently in draft mode since I think it needs everyone to run the smart configure tool to rebuild regexpMatch.sml, and I'm not too sure how to get around that


After adding basic regex support to DB.find (#1246), DB.find is unusably slow, which I didn't realise since I didn't have many theories built when testing.

Previously, the DB.find search regexp was compiled into a DFA every time an entry in the database was checked. This compilation step has now been moved so this only happens once per search.

image

Also, added . and * operators for any character and zero-or-more matches respectively:

image

Previously, the DB.find search regexp was compiled into a DFA every time an entry in the database was checked.
This compilation step has now been moved so this only happens once per search.
@mrichards30 mrichards30 deleted the bug/fix-db-find-slowness branch July 14, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant