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
Faster Real Time Maps #12752
Faster Real Time Maps #12752
Conversation
maxVisits = config.maxVisits || 100, | ||
changeVisitAlpha = typeof config.changeVisitAlpha === 'undefined' ? true : config.changeVisitAlpha, | ||
removeOldVisits = typeof config.removeOldVisits === 'undefined' ? true : config.removeOldVisits, | ||
doNotRefreshVisits = typeof config.doNotRefreshVisits === 'undefined' ? false : config.doNotRefreshVisits, | ||
enableAnimation = typeof config.enableAnimation === 'undefined' ? true : config.enableAnimation, | ||
forceNowValue = typeof config.forceNowValue === 'undefined' ? false : +config.forceNowValue, | ||
width = main.width(), |
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.
was this variable removed on purpose?
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.
didn't see any usage of that variable, or did I miss something?
In my case it resulted in this query: SELECT sub.* FROM ( SELECT log_visit.* FROM piwik_log_visit AS log_visit WHERE log_visit.idsite in (?) AND log_visit.visit_last_action_time >= ? ORDER BY idsite DESC, visit_last_action_time DESC LIMIT 0, 100 ) AS sub GROUP BY sub.idvisit ORDER BY sub.visit_last_action_time DESC LIMIT 100 with bind array ( 0 => '1', 1 => '2018-03-25 02:23:01', This looks good but wondering if we should reduce the last 30 days it looks at by default, change it to say |
That should depend on the currently chosen date any period. If you are looking at today, it should only query for todays data. But as it's a realtime map guess we could change that to lower ranges in another PR. |
The date selector was disabled in real time map when I tested it and the last30 comes from the controller. |
* do not use min timestamp for realtime map queries if not needed * remove some unused code * Plot only the last 7 days rather than last 30 days
Improves fetching visits for realtime map as mentioned in #12722 (comment)
refs #12722