-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add specs and fix memory leak (at least on Ruby 3.3+) #2116
Conversation
Thanks for the patch. Are there cases where you are using dynamic regexps in your app for SQLite filtering? I want to determine if this is an actual production issue. Sequel doesn't use The code you wrote for |
We do have internal applications that allow the user to filter by regexp. Memory leaks are not an issue there since we now use the Proc-variant of Yeah, I can make those changes. |
It now supports a The default is still I've removed the spec invoking |
I would prefer to just use |
Okay, I've updated the PR. |
Thanks for working on this. I'll do some testing locally and should have this merged today. |
You're welcome. No hurries. |
Wow, looks great! Thank you. |
Added specs for #2108. These will run conditionally with either:
Or:
On Ruby 3.3+ an
ObjectSpace::WeakKeyMap
is used to cache theRegexp
objects without keeping them in memory forever.