You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache reflection and case conversion on URL hot path
Memoize hot lookups and tighten array helpers used during transformation
URL building:
- StringUtils: cache snakeCaseToCamelCase / camelCaseToSnakeCase results
keyed by input (and separator when non-default). Inputs are bounded by
SDK property/config names, so the caches saturate immediately.
- ClassUtils: cache the unfiltered ReflectionClass::getConstants() result
per class name. Exclusions are applied after the cache lookup so the
cache is not polluted by per-call filters.
- ArrayUtils: replace array_values()-based isAssoc with array_is_list();
add fast paths in safeFilterFunc for null and string; refactor
safeImplode into a single foreach that only touches float values.
These changes complement the cloudinary_php Configuration clone fast-path
and together drop URL build cost from ~361 µs/op to ~28 µs/op on the
profiling workload, with no measurable memory growth (caches saturate at
~7 KB total and never grow with workload).
0 commit comments