-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
Add cache for un-changed files #3118
Conversation
8e4fcfa
to
d072b7c
Compare
Nice work! |
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.
Lgtm
phpstan and psalm both do dependency tracking for caching, which sounds like you want to do. |
@bendavies This PR uses part of PHPStan dependency resolver. It works quite well. Rector just sometimes needs full scope of the application, e.g. for unused public class method. For that I came up with interface that needs full cache clear. I wonder if that can be done in some better way. Ideas? |
Wow, great work Tomas! I will try to understand the implementation, but in those days it is really complex for me due to Covid limitations: I'm forced at home with my wife and my three years old son: it is really really complex to work... |
@Aerendir Oh, I can't imagine how you're feeling while coding in this environment. I wish we all survive this in both physical and mental health. I sometime go for a run in the park or coding there. It helps me to lay of some steam from lockdown. Also hangouting or calling with friends. If you want one, we can do :) Anyway, if you find something you don't understand, just go for it and write a comment. It's a first draft and I believe most of it can be written much better way. That's why appreciate feedback so much. |
4192638
to
1a7c7cc
Compare
1a7c7cc
to
3bf29fe
Compare
60a882b
to
82e092c
Compare
6bc5699
to
da29054
Compare
51d1e53
to
1ecd308
Compare
Let's 🚢 it! |
rectorphp/rector-src@9ffa707 Remove unused priority aware sorter etc (#3118)
Depends on #3197
Enable in Config
Without cache (~ 18 seconds on 200 files)
With cache (~ 1 second on 200 files)
Ref #3110
Notes
How to approach rules, that needs more scope for analysis, like:
PrivatizeLocalOnlyMethodRector
RemoveUnusedClassConstantRector
etc. Extend dependency files resolver? Probably best would be: