Row evolution takes too long to show up

Hi! I developed a new report. It is associated with a dimension and it’s all working “fine”. The problem is when I click on the “Open row evolution”, It takes TOO LONG to show the evolution graph. How can I make this run faster?

I don’t know if (somehow) I have to archive each row of the report.

This is the aggregateDayReport method of the Archiver.php:

$archiveProcessor = $this->getProcessor();
$dataTable = new DataTable();
$dataTable->addRowsFromSimpleArray($visitsData); //$visitsData is a well formed array.
$serializedDataTable = $dataTable->getSerialized();
$archiveProcessor->insertBlobRecord(self::XXX_RECORD_NAME, $serializedDataTable);

aggregateMultipleReports method:

$archiveProcessor = $this->getProcessor();
$archiveProcessor->aggregateDataTableRecords(self::READINGSMAS_RECORD_NAME);

And this is my API.php:

$archive   = Archive::build($idSite, $period, $date, $segment);
$dataTable = $archive->getDataTable(Archiver::XXX_RECORD_NAME);
return $dataTable;

I got this response from @sgiehl:

Row evolution loads a big bunch or archives to compare the data within. As long as all archives are built, there is nothing you can do about the performance of row evolution in your plugin.
Improvements therefor would be needed to be done in core.

I said:

@sgiehl, I don’t understand why the row evolution graph of the reports built by me are taking too long to be shown. Normal reports’ row evolution graph like campaigns, referrers, etc., load really fast. Is there something I am missing that I should add to my Report? Or at the moment of archiving?

A normal Matomo report row evolution graph loads in less than 4 seconds; the row evolution graph of my reports takes more than 30 seconds (I’m getting a timeout, and I know I can increase that time, but I’m not interested, my goal is to load my reports evolution row as fast as Matomo’s reports).

I hope there is something to do with this issue… I really need to load the row evolution in a short amount of seconds… thank you very much.

I’m using Matomo 3.2.0

@tseur said:

I would check if viewing the evolution report is still slow when you don’t include today in the row evolution.

I answered:

It is still slow when I don’t include today in the row evolution. This is a big problem for me…


I was ordered to continue this issue here. I could really use some help…

Github issue: Row evolution of custom report · Issue #12132 · matomo-org/matomo · GitHub

Related issue: Row evolution on high traffic site doesn't load

@eramirez Have you fix the issue? I meet the same question in custom report. it is so slowly.

I ended up cutting the amount of registers that I archive. Also, I configured the report to show by default only a few days and not 30 days. This is the only way I could find to show the row report in a decent amount of time. I hope it helps. @huang0808