[EXTREMELY BREAKING CHANGE] Eliminate ZObjectKeyFactory; use createZObjectKey instead.
Changes:
- move ZObjectKeyFactory tests to
test/unit/src/utilsTest.js
; update expectations - replace
ZObjectKeyFactory
withcreateZObjectKey
Advantages:
- slight performance improvement
- we no longer create a bunch of
ZObjectKey
s; instead, we operate only overArray
s ofString
s
- we no longer create a bunch of
- no more infinite backslashes
Disadvantages:
- less readable keys (but see below)
- need to do an additional check to detect list types (one of the few use cases of the non-stringified
ZObjectKey
)- but this additional check is quite cheap and intuitive
- given that, in some cases, the new check obviates the creation of a key altogether, and that, in other cases, key creation is faster than it was before, this is still a beneficial tradeoff in terms of performance
Open Questions:
- should we go back to the old format?
- if so, we should also implement this logic in PHP to create cache keys
- if not, we'll need to tweak both this format and the PHP-side one to prevent ambiguity
Edited by Cory Massaro