Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (Array.isArray(value)) { | ||
| const length = value.length; | ||
| const result = new Array(length); | ||
|
|
||
| for (let i = 0; i < length; i += 1) { | ||
| const item = value[i]; | ||
| result[i] = isObject(item) ? transformObject(item, parentPath) : item; |
There was a problem hiding this comment.
Parse primitive array elements via cachedValueParser
The new array handling returns primitive items unchanged (result[i] = … : item), so repeated scalar fields never flow through cachedValueParser. Any array of enums/INT64 values (e.g., metrics.interaction_event_types or other repeated primitives) will now be left as raw strings instead of being converted to their numeric/typed form because the type lookup is skipped entirely for each element. The previous implementation passed every array element through cachedValueParser, so this is a regression in parsing repeated primitive fields.
Useful? React with 👍 / 👎.
Before these changes: Average rows/sec: 159,236
After these changes: Average rows/sec: 380,188
Of course decamlizeKeys is only a part of the total CPU usage of this lib, but it's still a good chunk of overall performance for no downside.