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

Optimize memory consumption in ResultCacheManager #2681

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Oct 14, 2023

reproduced with

php bin/phpstan clear-result-cache -q && blackfire run --ignore-exit-status php -d memory_limit=448M bin/phpstan

the master process had a memory spike in sprintf() calls when writing the result cache

before this PR: (1.10.x@7c4ef6b2a)

Wall Time       35s
I/O Wait      19.2s
CPU Time      15.7s
Memory        221MB
Network         n/a     n/a     n/a
SQL             n/a     n/a
grafik

after this PR:

CPU Time      14.4s
Memory        197MB
Wall Time       33s
I/O Wait      18.7s
Network         n/a     n/a     n/a
SQL             n/a     n/a
grafik

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.

@staabm staabm changed the base branch from 1.11.x to 1.10.x October 14, 2023 16:35
@ondrejmirtes ondrejmirtes merged commit 18a6723 into phpstan:1.10.x Oct 14, 2023
413 of 416 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@staabm staabm deleted the res branch October 14, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants