-
Notifications
You must be signed in to change notification settings - Fork 158
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
ensure_unique_url very slow and memory consuming on large datasets #69
Comments
already planning on using batched finds here. open to other ideas as well. |
is would use SQL count on attr_name with "SOME%" this would give a good starting point, |
got a patch idea? |
master uses find_each to go through smaller sets. short of a patch submission i don't have a clear idea here. feel free to submit a pull request or whatever. happy thanksgiving as well. |
@rsl we ran into another similar issue. Expect a patch shortly. |
closing this as it seems dead. reopen if needed. |
in https://github.com/rsl/stringex/blob/master/lib/stringex/acts_as_url.rb#L109 it does a find(:all) on the model, which in case of an empty strings or nil in
url_attribute
, will be all records (> 70k in my case).I think you need a special strategy to handle empty strings or nil in
url_attribute
, for the other cases I would also recommend not using find(:all)The text was updated successfully, but these errors were encountered: