-
Notifications
You must be signed in to change notification settings - Fork 73
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
On Demand Symbol Loading #115
base: master
Are you sure you want to change the base?
On Demand Symbol Loading #115
Conversation
bin/composer-require-checker.php
Outdated
@@ -17,7 +17,7 @@ | |||
} | |||
|
|||
$foundAutoloadFile = true; | |||
require $autoloadFileLocation; | |||
$autoloader = require $autoloadFileLocation; |
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.
Hmm, this is something that shouldn't have been here in first place: it is scary dangerous, as it will mix autoloading definitions of this project and the analysed one.
Also, this effectively evaluates the "files" in a target project: big issue.
@WyriHaximus this is not a flaw in your patch, but in the design of this project
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.
Note: similar issues solved in roave/backwards-compatibility-check
in Roave/BackwardCompatibilityCheck#120 - /cc @maglnet
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.
Anyway, it drills down to using the factories in Roave\BetterReflection\SourceLocator\Type\Composer\Factory\
to look up symbols.
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.
@WyriHaximus Maybe we can work together in another patch these suggestions, hm? 👍
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.
@carusogabriel sure what do you have in mind? Currently working on using better-reflection for class locating for this PR
@Ocramius Just pushed more changes, is this the direction you suggested? |
Looks like the right direction 👍 |
a78abe9
to
eff90bc
Compare
On Demand Symbol Loading using composers autoloader. The current way of pre-loading all vendor symbols is very slow. On the initial project I've added it to it takes five minutes. To bring that number down I've started hacking this PoC together to bring that number down. This PoC currently takes about 2 -3 seconds to do the same by trying to find the symbols using composers autoloader.
If this is something you'd be interested in I gladly work it out into a full feature tests and all.