-
-
Notifications
You must be signed in to change notification settings - Fork 560
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
Simplify getVisitFn #694
Simplify getVisitFn #694
Conversation
Maybe you can help me with the coverage reduction. It's flagging this line as not covered... https://coveralls.io/builds/31813089/source?filename=src/Language/Visitor.php#L234 ...but it was not covered on master, either (I verified in the debugger). How do I handle this? |
@shmax since you simplified the function, one uncovered line now is worse in terms of percentage. I don't think we use arrays in place of a
|
Ahhh, I see... does this have anything to do with that one |
I went ahead and changed that |
@vladar What do ya say? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
I noticed in the profiler that
Visitor::getVisitFn
seems to be consuming a lot of resources, so I attempted to simplify it a bit.Here are the results of running our unit test suite 5 times.
This branch:
https://blackfire.io/profiles/de85207f-a7bc-4d69-bbc1-e950c839eb24/graph
Master:
https://blackfire.io/profiles/a1b07e4f-cba2-4327-84c5-c42e7559d8b2/graph
This is kind of an extreme use case, but you can see we improve performance by about 5%.