-
Notifications
You must be signed in to change notification settings - Fork 654
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
Can we reduce redis commands [from the editor]? #3943
Comments
That query is probably run by the visualizations list view because it needs the last 30 days of map views in order to draw a small graphic in the visualization preview. /cc @xavijam |
yep |
@javisantana I'm reassigning to you so you can decide who can handle it. |
the problem is, everytime we load Visualization model the extended stats (*) are fetch from redis, that launch 60 ZSCORE commands. The proposal is not load extended stats on public pages (since they are not needed) and doing it in /api/v2/vis endpoints. In a second phase we will add a flag in /api/v2/vis so frontend can request or not the extended stats. The extended stats could be also cached for some time since it's not that important to know minute by minute the visualization count per day. (*) there are 2 kind of stats:
|
Team maps page is also very slow, probably because of this as well. |
In development environment with SQL API, Maps API and Rails app running (resque was stopped) I started
redis-cli monitor
and tracked the number of commands.I got:
ZSCORE commands are requesting things like
"ZSCORE" "user:development:mapviews_es:stat_tag:3d5ce24a-c907-11e4-b2fc-6476ba93d4f6" "20150507"
. Do we need that somewhere in the editor for the map?The text was updated successfully, but these errors were encountered: