-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Optimization needed for /api/srch/profiles API query #3147
Comments
I believe this is a double-ended string match that's running against the whole table - inefficient... plots2/app/services/srch_scope.rb Lines 5 to 8 in de4d09f
This is especially apparent when trying to autocomplete usernames after typing Lines 44 to 46 in de4d09f
Can we use this new full-text search function instead of the above code? |
#3148 - one attempt at this... any suggestions? |
Optimizing front end w @ryzokuken too: https://github.com/ichord/At.js plots2/app/views/comments/_form.html.erb Lines 76 to 88 in de4d09f
|
caching example here: https://github.com/ichord/At.js/wiki/How-to-use-remoteFilter#caching-example |
i also limited to 10 results in the reply, in |
Opened a caching issue at #3149! |
@ryzokuken is working on a debouncing strategy https://css-tricks.com/debouncing-throttling-explained-examples/ |
We could further optimize the |
#3150 - searching only usernames! |
ok awesome, previously this had ~600 results, now only 10: https://publiclab.org/api/srch/profiles?srchString=aya |
yeah, we were planning to set aside some weeks to work only on improving the search service, but we can start this week, beginning with the #3069. |
We believe we addressing those concerns here #3134 could you please take a look there? we left some comments along the code reflecting the questions we had while working on the endpoint. Thanks! |
Also implementing @ryzokuken's optimization here: https://www.irccloud.com/pastebin/yTikGnHV/ |
Ok, and working on this in #3172 but unable to get the debounce to work yet... |
I see. I would love to give it a try later on. |
awesome, thanks!
…On Tue, Oct 30, 2018 at 6:15 PM Radhika Dua ***@***.***> wrote:
I see. I would love to give it a try later on.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3147 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ1k9mg_NN_-OswDS624ykPSuG0dEks5uqM9zgaJpZM4VgISi>
.
|
@milaaraujo is this potentially of interest for the API work you're doing? |
Not directly... I think! What exactly needs to be done here? We are already using the full-text search function. @jywarren |
I'm thinking this on caching results: #3149 potentially |
Thanks! |
Can we close this one, @jywarren? |
Yes, esp since it's being worked on in #4670. Thanks! |
Probably due to very high number of users in the system (300k+?) this query needs some optimization as I believe it's responsible for some outages, and is running very slow!
https://publiclab.org/api/srch/profiles?srchString=aya
@icarito - and be aware of this @milaaraujo @stefannibrasil 👍
The text was updated successfully, but these errors were encountered: