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

Do not use container in compiler passes #958

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

ruudk
Copy link
Contributor

@ruudk ruudk commented Dec 8, 2021

By manually constructing the TypeGenerator in TypeGeneratorPass we gain performance
benefits because we don't have the boot the whole container while we are in fact compiling
the container.

The container should not be used in compiler passes:

As a rule, only work with services definition in a compiler pass and do not create service instances. In practice, this means using the methods has(), findDefinition(), getDefinition(), setDefinition(), etc. instead of get(), set(), etc.

Fixes 899

@ruudk ruudk force-pushed the don't-boot-container-in-pass branch from 71411d5 to 1c7b8eb Compare December 8, 2021 17:09
By manually constructing the `TypeGenerator` in `TypeGeneratorPass` we gain performance
benefits because we don't have the boot the whole container while we are in fact compiling
the container.

The container should not be used in compiler passes:
> As a rule, only work with services definition in a compiler pass and do not create service instances. In practice, this means using the methods has(), findDefinition(), getDefinition(), setDefinition(), etc. instead of get(), set(), etc.

Fixes 899
@ruudk ruudk force-pushed the don't-boot-container-in-pass branch from 1c7b8eb to 40d34eb Compare December 8, 2021 17:12
@ruudk ruudk requested a review from mcg-web December 8, 2021 17:33
@mcg-web mcg-web merged commit 5679b49 into overblog:master Dec 8, 2021
@ruudk ruudk deleted the don't-boot-container-in-pass branch December 8, 2021 17:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants