liip / liip/LiipFunctionalTestBundle
Use private properties to store sensible and big variables to improve memory usage (Enhancement)
- Dominant language
- PHP
- Stars
- 648
- Forks
- 179
- PR merge metrics
- No merged PRs in 30d
Description
I'm refactoring some of my test class to use less memory as I had some problems with large memory usage on my CI server.
Going deeper in the code to find issues I came up with a `trait` that can teardown automatically the tests and set all properties to `null` to free up memory space.
The `trait` also provides some useful methods to better manage internal variables and resources, storing them in some properties that are then set to `null`.
This bundle seems to use a lot of memory as it creates a lot of very big variables.
It may be sufficient to use properties to store objects like kernel, clients, and similar thing, and, adding a simple `tearDown()` method, set those to `null` to free up memory space and improve tests performance.
Maybe this helpful to you?
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by locating the bundle's functional test classes and the large kernel, client, and related variables; compare current teardown behavior with the proposed trait, and consider the work done when relevant properties are released without breaking the test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- performance, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100