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
Performance improvements for goals by pages #19974
Conversation
…al at a time, reverted in-code aggregation, expanded page tests to cover multi-day aggregation
…st expected results
@justinvelluppillai I'm currently looking at a solution for supporting segments with the custom query. We definitely don't want to duplicate the segment query building logic, so it's probably a case of either improving the |
ok thanks, I've removed the |
…to allow segment wrapping
Thanks for the feedback @sgiehl I've applied all the suggested improvements. For large dataset performance the query was tested on a real world database where a single goal had 500k+ conversions in a single day. The new query now runs for each goal individually and it took just under 5minutes to complete archiving for this goal, whereas previously it failed to complete goal actions archiving at all. There are more details about the performance testing in the comments for L3-313 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left another comment. Otherwise this looks fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that looks really good @bx80 . Great this got a lot simpler now and that we'll have this query use less memory soon. I didn't do an in-depth review but looks overall all good. Only left a few minor comments to consider.
plugins/Goals/tests/System/expected/test_trackGoals_pages__Actions.getPageTitles_week.xml
Show resolved
Hide resolved
…for special goals, refactored query origin hint method to dbhelper and added test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it @bx80 but looks good
@sgiehl When you have a chance, could you please give this a final check and merge it if there are no outstanding issues? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few minor comments. Otherwise the code looks fine. Archiving seems to work as expected, even for segments.
@bx80 Did you check if the results of the tests have the correct numbers? As you change the existing test fixtures all numbers changed, which makes it hard to verify if they are "still" correct. I tried checking out the old test files, but using the new code for running the tests. The resulting files then differed slightly. Not sure if that is correct or not...
@sgiehl Thanks for reviewing this one, here is the spreadsheet I created to check the test results: m-2030-Goals-per-page-test-calcs.ods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a look at the test calculations. For me that looks valid. Still not 100% sure why some other tests changed their results slightly, but maybe there was a problem before, that is now fixed?
I think that was probably the case. |
Description:
This is a rework of #18221 to improve performance and decrease memory usage when archiving.
Changes:
Refs: L3-313
Review