Make it faster
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.9k
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Last time I looked, I couldn't find any way to really squeeze much more perf. This is mainly due to the fact that DeepCopy deep copy an object. As such, you cannot assume the properties of that object as values can be dynamically added. The result is DeepCopy must rely on a brand new instance of ReflectionObject each time, even if you get two objects of the same class.
A way to change that would maybe to add a mode to clone class instances instead, i.e. to rely on ReflectionClass and cache it somehow.
But to be honest this is just an idea like that. I'm actually not sure if it's really worth it, maybe it would be better to start by having a benchmark and see if the perf gain is worth it.
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 by reading the DeepCopy implementation around its use of ReflectionObject and the object-cloning path described in the issue. Investigate whether ReflectionClass caching or a class-instance mode is viable, then add a benchmark to measure the performance gain before deciding what change is justified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100