-
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
Reduced response time in nearby People search API #9940
Conversation
Wow 👀 So we don't need to deal with n+1 problem at all? |
4dbe8b2
to
ccb5e78
Compare
Code Climate has analyzed commit ccb5e78 and detected 0 issues on this pull request. View more on Code Climate. |
Codecov Report
@@ Coverage Diff @@
## main #9940 +/- ##
==========================================
- Coverage 82.13% 82.13% -0.01%
==========================================
Files 98 98
Lines 5968 5966 -2
==========================================
- Hits 4902 4900 -2
Misses 1066 1066
|
Ah! I didn't see the discussion on the main issue. Let's think of improving the performance furthermore. Currently looping over every node by the user to check if it has |
Yeah we need to analyse further but in my opinion maybe we should proceed with merging this, since this is a significant improvement ( Significant as in Huge :O ) Can work on others in subsequent PRs as we proceed with discussion at #7556 |
user_tag.name == "location:blurred" | ||
end | ||
end | ||
items = items.where('user_tags.value <> "location:blurred"') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesomeeeee
Very excited for this! |
* reduced response time in nearby People search api * reformatted previous commit
* reduced response time in nearby People search api * reformatted previous commit
Fixes #7556
rake test
@publiclab/reviewers
for help, in a comment belowBefore -
GET: https://publiclab.org/api/srch/nearbyPeople?nwlat=10.0&selat=0.0&nwlng=0.0&selng=10.0
Time: 39.36
After -
GET: https://unstable.publiclab.org/api/srch/nearbyPeople?nwlat=10.0&selat=0.0&nwlng=0.0&selng=10.0
Time : 2.12s