Uh oh!
There was an error while loading. Please reload this page.
Memoize expensive calls to docComments. - #458
Merged
Merged
Conversation
pyguerderforce-pushed
the
memoize-doc-calls
branch
from
February 25, 2021 21:30
e23f3d0 to
f8aef12Compareondrejmirtes
requested changes
Feb 26, 2021
ondrejmirtes
left a comment
Member
There was a problem hiding this comment.
Hi, this looks promising, thanks!
Member
There was a problem hiding this comment.
I'd like to use a control structure (an if) here instead of just ?? on a single line. Like this:
if ($this->reflectionDocComment !== null) {
$docComment = $this->reflectionDocComment;
} else {
$docComment = $this->reflection->getDocComment();
$this->reflectionDocComment = $docComment;
}This reduces both RAM consumption & execution time.
pyguerderforce-pushed
the
memoize-doc-calls
branch
from
February 26, 2021 09:39
f8aef12 to
0329dfdComparepyguerder
commented
Feb 26, 2021
ContributorAuthor
@ondrejmirtes thanks for your feedback! Can you please look at it again? I don't understand why some tests fail. I'm not sure it is related to my changes... Can you please advise? |
ondrejmirtes
commented
Feb 26, 2021
Member
Master is broken, it's not your fault 😊 |
ondrejmirtes
commented
Feb 26, 2021
Member
Thank you! |
This was referenced Mar 9, 2021
Closed
Bump phpstan/phpstan from 0.12.78 to 0.12.81 in /composer/helpers/v1
dependabot/dependabot-core#3248
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran multiple tests using Blackfire. Memoizing these expensive calls reduces both RAM consumption & execution time.
This is an example with running on https://github.com/pyguerder/phpstan-propel2-example/blob/master/generated-classes/App/AnalyzeMe2.php only: https://blackfire.io/profiles/compare/7f25525d-0676-40b8-a809-a92692106be6/graph
And this is an example running on my main project (154 classes): https://blackfire.io/profiles/compare/7cc0ea82-3727-4a95-b948-112678bc0991/graph
@ondrejmirtes can you please have a look at this?
Thanks in advance, best regards