-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Similar to PHPC-2699, add typed readonly properties to all BSON classes. The goal is to remove the need to have the get_properties_hash functions, and instead tracking properties in the standard zend_object properties table.
Note that adding properties and initialising them directly on BSON deserialisation could have a memory impact. To avoid negative impact, we should:
- add benchmarks to be able to compare the impact of the changes
- consider creating property zvals lazily when a property is accessed for the first time.
The MongoDB\BSON\Document and MongoDB\BSON\PackedArray classes are excluded from this: the former implements a dynamic access pattern using read_property and read_dimension, the latter represents an array which does not have any properties.