Lazy app config values may still be loaded on every request
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
On setups with LDAP or other cases where getKeys is used the lazy app config is basically ignored and we fetch the full table
This may lead to larger amount of data being transferred on every request from the database and being hold in memory for each request:
For the impact, on our instance we have a config value that is 8MB in size which is needed on every request. With 250 concurrent requests this is an additional demand of 2GB for the server.
cc @ArtificialOwl @sorbaugh
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading lib/private/AppConfig.php around line 99 and apps/user_ldap/lib/Helper.php around line 110, then trace how getKeys accesses lazy app configuration. Reproduce the request-time configuration loading and verify that large lazy values are not fetched unnecessarily when getKeys is used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100