lenra-io / lenra-io/app-lib-php
[Task] Limit the number of autoload classes
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
What should be done
Every PHP request includes (using require_once) the autoloader and takes about 4ms.
When request time average is about 6ms, the 4ms of the autoloader are a bit to long...
Limiting the number of classes (and corresponding files) can speed up the autoloader perfs.
A first pass has been made by removing the Jade generated classes from the runtime, but it should be done in the internal API dependency two.
Technical recommandation
Avoid using dependencies for runtime.
The generated classes could be used in a script to generate the real final classes.
This script and generated classes should be added to the app-lib-php project in order to avoid having a dependency for runtime and have more control on what is embedded in the apps.
Ecological concerns
Separate the two generation scripts in order to only run the needed one on upgrades.
Avoid generating many classes.
The would be to generate one classes with all the calls and without HTTP client dependency need.
Contributor guide
No contributing guide indexed for this repository
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 in the app-lib-php runtime and inspect the require_once autoloader, the internal API dependency, and the existing Jade generation work. Map the generation scripts and generated classes; done means reducing runtime classes and dependencies while allowing only the needed generation script to run during upgrades.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100