Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Backport performance improvements of StringUtil::encodeEmail #8679

Closed
ausi opened this issue Mar 24, 2017 · 3 comments
Closed

Backport performance improvements of StringUtil::encodeEmail #8679

ausi opened this issue Mar 24, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@ausi
Copy link
Member

ausi commented Mar 24, 2017

I think we should backport contao/core-bundle@4d26b21 to fix the performance issues in Contao 3.5 too.

If we don’t want to backport the whole new email-handling, i think it is enough to replace the *s in StringUtil.php:305 with {1,64} and {1,252}.

The performance issue itself can be reproduced by executing \StringUtil::encodeEmail(str_repeat('x', 100 * 1024));;

@leofeyer leofeyer self-assigned this Mar 25, 2017
@leofeyer leofeyer added this to the 3.5.26 milestone Mar 25, 2017
@leofeyer
Copy link
Member

Back ported in 682ab51.

@ausi
Copy link
Member Author

ausi commented Mar 26, 2017

I think I made a mistake, it should be {0,64} and {0,252}, otherwise ab@a.xx only matches as b@a.xx

@leofeyer
Copy link
Member

Fixed in 4cfdfb4.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants