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

EZP-31084: Fix infinitive loop in cache emptyTrash() #2871

Merged
merged 1 commit into from
Nov 14, 2019

Conversation

andrerom
Copy link
Contributor

Question Answer
JIRA issue EZP-31084
Bug/Improvement yes
Target version 7.5
BC breaks no
Tests pass yes
Doc needed no

Attempt to fix issue found in #2847 by @mnocon.

@andrerom andrerom requested a review from mnocon November 13, 2019 20:07
Copy link
Member

@mnocon mnocon left a comment

Choose a reason for hiding this comment

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

Looks good now! I've also prepared some benchmarking with the Command I've mentioned in #2847 to compare the behaviour of TrashService::emptyTrash()

After: #2847

(number of items in trash -> Time in ms, Memory in Bytes)
100 -> Time: 1032, Memory: 46661632
150 -> Time: 1025.8, Memory: 46661632
500 -> Time: 3216.9, Memory: 46661632
2000 -> Time: 12527.2, Memory: 46661632
5000 -> Time: 30693.8, Memory: 48758784
9000 -> Time: 56136.7, Memory: 50855936

Before:

(number of items in trash -> Time in ms, Memory in Bytes)
100 -> Time: 597.1, Memory: 46661632
150 -> Time: 1010.4, Memory: 46661632
500 -> Time: 2850.8, Memory: 46661632
2000 -> Time: 12138.2, Memory: 50855936
5000 -> Time: 31895.1, Memory: 61341696
9000 -> Time: 51164.7, Memory: 69730304

I'd say there isn't much of a time difference, but the memory footprint definitely looks lower when there are more items in Trash.

@andrerom
Copy link
Contributor Author

andrerom commented Nov 14, 2019

Nice one @mnocon, good to see the growth is noticeably slower.

You should btw expect somewhat larger difference on Admin trash view once we fix the remaining issues, as that loads full API objects and not just SPI objects which is the case here.

@andrerom andrerom merged commit 62e51d6 into 7.5 Nov 14, 2019
@andrerom andrerom deleted the EZP-31084-part1-loop-issue branch November 14, 2019 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants