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

Cache configs by group #115

Open
rustamwin opened this issue Mar 31, 2022 · 5 comments
Open

Cache configs by group #115

rustamwin opened this issue Mar 31, 2022 · 5 comments
Assignees
Labels

Comments

@rustamwin
Copy link
Member

Caching configurations can improve performance.

Proposal:

cache each config group to one file

  • web.php
  • console.php
  • providers-web.php
  • providers-console.php
  • etc
@samdark
Copy link
Member

samdark commented Mar 31, 2022

We're tried that. Caching requires serialization/deserialization for many constructs we can't directly dump and the process of de-serialization proved to be slower than doing many require calls. It was quite a long time ago though, maybe it worth re-checking it.

@rustamwin
Copy link
Member Author

We're tried that. Caching requires serialization/deserialization for many constructs we can't directly dump and the process of de-serialization proved to be slower than doing many require calls. It was quite a long time ago though, maybe it worth re-checking it.

At least only params.php can be cached. In params contains almost arrays. WDYT?

@vjik
Copy link
Member

vjik commented Mar 31, 2022

We're tried that. Caching requires serialization/deserialization for many constructs we can't directly dump and the process of de-serialization proved to be slower than doing many require calls. It was quite a long time ago though, maybe it worth re-checking it.

At least only params.php can be cached. In params contains almost arrays. WDYT?

we don't can sure that params contain only scalar values and without serialization this cannot be done.

@devanych
Copy link
Member

We're tried that. Caching requires serialization/deserialization for many constructs we can't directly dump and the process of de-serialization proved to be slower than doing many require calls. It was quite a long time ago though, maybe it worth re-checking it.

At least only params.php can be cached. In params contains almost arrays. WDYT?

For example, in the parameters, a static method call:
https://github.com/yiisoft/app/blob/master/config/params.php#L43

@xepozz
Copy link
Contributor

xepozz commented Apr 19, 2022

Also https://github.com/yiisoft/classifier should be cached to reduce IO operations.

@rustamwin rustamwin self-assigned this Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants