-
-
Notifications
You must be signed in to change notification settings - Fork 3k
DPMMA-3118 Segment build time optimization (Segment membership filter) #15031
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
DPMMA-3118 Segment build time optimization (Segment membership filter) #15031
Conversation
e9f9111
to
f62d842
Compare
fix: [DPMMA-3118] breaking change info and cleanup
f62d842
to
1e22020
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 7.x #15031 +/- ##
=========================================
Coverage 66.64% 66.64%
Complexity 35046 35046
=========================================
Files 2300 2299 -1
Lines 141364 141371 +7
=========================================
+ Hits 94210 94220 +10
+ Misses 47154 47151 -3
🚀 New features to boost your workflow:
|
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.
Seems good to me 👍
Code looks legit
I tested few filters, query seems correct generated.
Well done
After testing phase we've deployed this on production and this solution has reduced segment rebuild time by 99%. No issues have been observed so far. |
Just a small conflict to fix here @patrykgruszka then we should be good to go! |
@RCheesley, thanks for the heads-up, done :) |
|
mautic#15031) * fix: [DPMMA-3118] segment static filters fix: [DPMMA-3118] breaking change info and cleanup * fix: [DPMMA-3118] phpstan and csfixer * fix: [DPMMA-3118] segment functional tests --------- Co-authored-by: Ruth Cheesley <ruth@ruthcheesley.co.uk>
Description
This PR improves segment build performance by verifying contact membership in dependent segments, eliminating redundant query execution and reducing database load.
Changes included in this PR:
ContactSegmentFilterDictionary.php
as unused.Optimization results observed in the test environment:
Before this PR: Total time was 673.18 seconds
After this PR: Total time reduced to 80.16 seconds
📋 Steps to test this PR:
mautic:segments:update
command for a segment with dependencies.