Skip to content

Improve decoding performance by reducing new string creation#13

Merged
martincivan merged 1 commit intoQualityUnit:masterfrom
ProtonMail:feat/perf-string-ops
Jun 5, 2023
Merged

Improve decoding performance by reducing new string creation#13
martincivan merged 1 commit intoQualityUnit:masterfrom
ProtonMail:feat/perf-string-ops

Conversation

@bartbutler
Copy link

Rewriting strings constantly uses a lot of memory and slows decoding considerably. There was also a place where a large string was built incrementally. A test was broken as well (trailing null byte in a filename) and there were several test warnings in PHPUnit 10.2.

I've fixed the tests and done the minimal changes necessary to get rid of the slow string operations. I don't have benchmarks on the speed improvements but the timeouts we were seeing for mail delivery have disappeared so it is certainly faster and should also be much more resource efficient.

@martincivan martincivan merged commit 2df3b08 into QualityUnit:master Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants