Skip to content
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

Changed service causes dependency checks on every request #144

Closed
fmasa opened this issue Feb 21, 2017 · 3 comments
Closed

Changed service causes dependency checks on every request #144

fmasa opened this issue Feb 21, 2017 · 3 comments

Comments

@fmasa
Copy link

fmasa commented Feb 21, 2017

There is a problem with current DIC expiration check.

Cosider following config:

services:
- MyService

Let's say I change content of MyService.php from

<?php
class MyService {}

to

<?php
class MyService
{
    public function foo();
}

(file changed, dependencies didn't)

On next request DependencyChecker compares modification times with meta file of generated container, which differs. Dependency hash is now calculated and matches the one in meta file, so container is considered non-expired.

The problem is that meta file is not updated and hash is calculated on every request, which leads to performance overhead for large containers.

@fmasa fmasa changed the title Changed service causes dependency checks Changed service causes dependency checks on every request Feb 21, 2017
@TomasVotruba
Copy link
Contributor

Hi, could you send simple failing test please?

@TomasVotruba
Copy link
Contributor

Thank you @dg !

@fmasa
Copy link
Author

fmasa commented Feb 27, 2017

Thanks :) @dg

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

2 participants