@mattab opened this Issue on February 25th 2014 Owner

For periods that are Date ranges (period=range) and that are:

  • exactly one week
  • exactly one month
  • exactly one year

then, if it has been pre-processed before, it should use the existing Week / month or year report.

  • index.php?module=API&method=API.get&idSite=1&period=week&date=2014-02-18&format=xml
  • index.php?module=API&method=API.get&idSite=1&period=range&date=2014-02-16,2014-02-23&format=xml

In my tests, the second request was not using the blob from the first request, as it triggered archiving (and took 20s to return).

So, we should fix the algorithm which will result in better performance and user experiece.

@mattab commented on February 25th 2014 Owner

The second request was slow because it was selecting the weekly data and then copying it into the new archive. We could avoid such copy when the range is exactly an existing range, but this won't make much difference.

So, the assumption about range not using existing period was wrong. It already works...

This Issue was closed on February 25th 2014
Powered by GitHub Issue Mirror