Skip to content
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

Various performance improvements and bugfixes. #7465

Merged
merged 4 commits into from Mar 18, 2015
Merged

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Mar 18, 2015

refs #4768 #7388 #6763

Improves performance for

  • Archiving (especially month, year archiving but as well archiving other blob records)
  • Range dates
  • Labelfilter
  • Should make all kind of reports faster as well but not as much

Fixed bugs in LabelFilter, ReportsTotalCalculation, Sort and more.

A new feature is that we do now actually sort API output by nb_visits, labels by default which was often not the case. Also we do now sort by labels if both columns do not have a value. Eg if two rows do not have nb_visits or any other filter_sort_column then the order was random. We do now sort by label in such a case.

I didn't create a pull request for each fix separately since they only shows after tweaking some code and where not really visible before.

A few UI tests fail since we do now sort by label if two rows have both no value set. See eg http://builds-artifacts.piwik.org/ui-tests.datatable_tweaks/11069.7/screenshot-diffs/singlediff.html?processed=../processed-ui-screenshots/PivotByDimension_pivoted.png&expected=PivotByDimension_pivoted.png&github=PivotByDimension_pivoted.png

For more information see my comments in the code. It would be kinda nice to have this in 2.12.0 since it brings many performance improvements.

Imporves performance for Archiving and Range dates. Makes all kind of
reports faster as well. Fixed bugs in labelFilter, reports total calculation
and more.
@tsteur tsteur added the Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. label Mar 18, 2015
@@ -120,6 +121,7 @@ private function getGenericFiltersHavingDefaultValues()
foreach ($filters as $index => $filter) {
if ($filter[0] === 'Sort') {
$filters[$index][1]['filter_sort_column'] = array('string', $this->report->getDefaultSortColumn());
$filters[$index][1]['filter_sort_order'] = array('string', $this->report->getDefaultSortOrder());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reports need to be able to specify a default sort order. Eg when defaultSortOrder should be label, asc

@@ -90,6 +90,6 @@
<reportTotal>
<nb_visits>8</nb_visits>
<nb_hits>13</nb_hits>
<exit_nb_visits>1</exit_nb_visits>
<exit_nb_visits>2</exit_nb_visits>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another example where one can see that it fixes report total calculation as mentioned before.

@tsteur tsteur added Needs Review PRs that need a code review and removed Pull Request WIP Indicates the current pull request is still work in progress and not ready yet for a review. labels Mar 18, 2015
@mattab
Copy link
Member

mattab commented Mar 18, 2015

Looks good to me 👍 merging

mattab pushed a commit that referenced this pull request Mar 18, 2015
Various performance improvements and bugfixes.
@mattab mattab merged commit c3bc011 into master Mar 18, 2015
@mattab mattab added the c: Performance For when we could improve the performance / speed of Matomo. label Mar 22, 2015
@mattab mattab added this to the Piwik 2.12.0 milestone Mar 22, 2015
@mnapoli mnapoli deleted the datatable_tweaks branch March 23, 2015 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants