Skip to content

[RFC] Lazy configuration for services #7085

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

Closed
dlsniper opened this issue Feb 15, 2013 · 6 comments
Closed

[RFC] Lazy configuration for services #7085

dlsniper opened this issue Feb 15, 2013 · 6 comments

Comments

@dlsniper
Copy link
Contributor

A spin-off idea from #7071:

Should we add the ability to specify which service should be lazy configured via a special parameter and then the configuration for it kick in before usage first usage?

I know it won't solve the problem described in #7071 but for cases where displaying a simple page doesn't require say Doctrine service or even a Session service I think this could be a nice addition.

Any opinions on this?

@mvrhov
Copy link

mvrhov commented Feb 15, 2013

Don't we have something like this with the idea from @lsmith77 to use proxy services?

@vicb
Copy link
Contributor

vicb commented Feb 15, 2013

@dlsniper what do you mean excatly. The DIC is used to prevent instatiating anything (ie Doctrine, Session) when you don't need it. There must be something I don't get.

@stof
Copy link
Member

stof commented Feb 15, 2013

@dlsniper All services are created only on first use. The issue is that the profiler is called on each page, as I said in the other PR discussion.

@dlsniper
Copy link
Contributor Author

@mvrhov something like what @lsmith said but for configuring them, configuration parsing and so on.

@vicb / @stof I wasn't very clear. Doctrine/Session are indeed lazy loaded but their configuration step still takes place when the request is done, no? Or am I wrong here?

@vicb
Copy link
Contributor

vicb commented Feb 15, 2013

@dlsniper what do you call configuration ? Extension configurations are processed only once (on cache generation), thinking of something else ?

@dlsniper
Copy link
Contributor Author

Closing this as @vicb is right, too much caching to consider at that time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants