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
Introduce additional cache layer for heavy API calls #7143
Comments
I get a lot of requests on reports for custom date ranges. In 'larger' environments they can be quite time and resource consuming. Being able to schedule a custom date range report and be notified when data is ready would be of great use! |
In general it would be good if we managed to solve the performance problems without using API level caching when possible. For example for large Date range is another use case where the requests are time+resource intensive. I would love if we could find a smart solution to make processing date ranges very fast like they are in google analytics. I'm sure it's possible if we think about alternative implementations and profile the code better. Hopefully we can make progress as well in #6763 -- but that issue is specifically for sub-tables. Maybe we also have problems with "date range" requests that involve sub-tables? if so, we should create a separate issue specifically for date range requests which don't involve sub-tables. @RMastop @mgazdzik what would help as a next step for this issue is if you could post here all HTTP requests that are "heavy" as per your experience with clients and large environment? |
I think that pre-processing all reports for flattened versions may cause significant increase in archive tables size (basically every report would be stored twice). Also this won't solve problem with custom date ranges processing. My general thought was that maybe there could be easy mechanism to pick which requests user wants to have pre-processed, and therefore process only what is really needed instead of processing everything that can be. A single mechanism would solve also further problems (like processing certaing segment only for one plugin, instead of processing it for all). After all maybe it will not be very big effort to prepare something like that, to provide initial functionality before actual problems will be resolved ? |
hi @mattab, thanks for followup on this issue. |
Hi Richard, could you report this issue with details, URLs, etc. to Piwik support? Update: issue is described in #7458 |
Thanks @mattab, email has been sent. |
this API performance issue will be fixed by making the Live API code more efficient: #7458 |
Flattened performance was improved / fixed in 2.12.0 👍 If anyone experiences performance issues with a particular API, please report here or create an issue with the details. (ideally we would postpone implementing API caching until required) |
For big instances some API calls are extremely slow (for ex. ranges, flattened Action or Events reports, etc.). It may take significant ammount of time to process even having them pre-processed in archives.
To tackle this, there could be additional caching layer above archives, which would store this data and make it easily available for end-user.
Here are some ideas what would be required to acomplish this:
Please let me know what do you think about it ?
The text was updated successfully, but these errors were encountered: