-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
Reduce loading time #62
Conversation
We should be able to do something based off I don't think the gemspec will need changing, so much as changing it in fog/lib/fog.rb if I'm not totally mistaken. Does that make more sense? |
If we don't need to change the |
@plribeiro3000 so, first off, I'm hoping I'm not totally mistaken here. But I believe when you require a gem it includes that gems |
@geemus It makes sense but i think it won't help much if we don't explicity say it to load this new files. I know we are doing this in the Is that correct? What do you think? |
Hmm. I guess those will have to remain, but if they just browse the path once (and then inside each sub-gem it does things relatively) I think it might help? in |
Actually, upon further consideration... I wonder if the better/more proper fix wouldn't be to make it so that these, broken-out gems were changed so that instead of having |
@geemus I think it makes sense. But i think bundler would not work out of the box. The user will always have to require the gem but it might me a small change to improve everything. I will try to get this done asap. |
Will it break bundler? @hone - halp? Am I breaking the world by doing this? And/or could my suspicions be valid? |
1eb2547
to
53143a1
Compare
ok @geemus. I'm using relative paths now. Don't merge this yet. I'm gonna create a branch in all providers doing that and point to those branchs from my fork of fog and we can see if it will help at all. =) Just give me a few minutes please! |
@plribeiro3000 cool, glad that it is clearer now. I reached out to some other people to see if they thought this might help, but I guess if we try it maybe we can see more clearly. Probably a good thing to do regardless. |
I wonder if the sort of |
@geemus Me too. But as i believe this will be more trickier i will try to see the result of the relative requires first. I plan to have a branch based version of |
Cool, I reached out to one of the bundler guys also to see if he thinks the problem I described might actually be the culprit or just a dead end. So hopefully between your experiment and their thoughts we can at least figure out if this is worth pursuing further. |
7a8c75b
to
663d2d8
Compare
This is a huge diff but sounds like it did the trick. This is a start point so we can discuss about it and find the best approach to tackle it. The changes are:
|
663d2d8
to
722bbdf
Compare
@lanej Your feedback is important as well. Sorry if i missed you in the comment above. 😓 |
@plribeiro3000 no worries. I love it as it lies. Only possible issue is what ruby is doing with |
@lanej Sure thing. @tokengeek has brought this to my attention as well sometime ago. But i could not find another way to fix this issue. IMO the issue lies in the amount of files it has to load for every provider. Perhaps you have another idea? |
@plribeiro3000 beyond doing our own thread-safe const_missing hack (:puke:). not really. i say we ride autoload till the end. just wanted to make sure we all knew about the baggage. |
@lanej Yeah. I think that in the end we will end up doing some fancy lazy loading solution if |
@plribeiro3000 hopefully by that point, mri conjures up a respectable substitute. I am in favor of merging this as it sits. |
@lanej awesome. Let me know when you merge and release. =) |
Thanks! On Tue, Apr 7, 2015 at 3:08 PM, Josh Lane notifications@github.com wrote:
|
Awesome. Thanks! |
Thanks! On Tue, Apr 7, 2015 at 5:04 PM, Paulo Henrique Lopes Ribeiro <
|
This is related to fog/fog#3430
@geemus After starting this refactor i think this wont make a great difference since we cannot specify which file to load from
gemspec
as we can do fromGemfile
.Also, how do you think we should handle the relative requires you mentioned? We can't use
require_relative
yet since we still support1.8.7
. =s