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

Support for secondary column support and faster datatable sort #8449

Merged
merged 4 commits into from Aug 18, 2015

Conversation

Projects
None yet
1 participant
@tsteur
Copy link
Member

commented Jul 28, 2015

fixes #7401

Made sort faster by using builtin php methods. Currently, we sort via usort in PHP. This is quite slow especially when we sort many rows, eg 25k rows or more. The time needed to sort depends a lot on the data, the column to sort, etc. that's why it is hard to say how much performance improvement we will gain. On 25k rows it can drop from eg before about 900ms to 500ms.

As a side effect the code is much better tested and it does now use a secondary column on either nb_visits or label if possible see #7401

The sort flags SORT_NATURAL and SORT_FLAG_CASE were added in PHP 5.4 which this pull request requires, therefore this goes into Piwik 3.0

Original PR was made in #7420

refs #4768

@tsteur tsteur added this to the 3.0.0 milestone Jul 28, 2015

@tsteur

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2015

FYI: Need to rerun test once the UI test run on PHP 5.4 in this branch

@tsteur

This comment has been minimized.

Copy link
Member Author

commented Jul 29, 2015

@tsteur tsteur force-pushed the fast_sort2 branch to d2988fb Jul 29, 2015

@tsteur

This comment has been minimized.

Copy link
Member Author

commented Jul 30, 2015

The tests in SortTest that were in original PR were already merged previously. There are tests for Sorter class now to make sure it works as expected. The sort filter itself does not really contain any logic so did not add more tests as there are already

@tsteur tsteur modified the milestones: 3.0.0-b1, 3.0.0 Aug 13, 2015

@tsteur tsteur merged commit 1d1ceb2 into 3.0 Aug 18, 2015

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
Scrutinizer 10 updated code elements
Details

@tsteur tsteur deleted the fast_sort2 branch Aug 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.