-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Sort private attributes for improved stable encoding (#401)
To help increase cache hits, we want to always use a stable encoding for the context. This was done in a previous commit when we added the `encoder.outputFormatting = [.sortedKeys]` modification. A context's private attributes are sorted as a set, which makes no guarantee about encoding order. To address this, we are sorting the private attributes prior to the JSON encoding phase. As a result, we would expect to see an increase in cache hits for customers.
- Loading branch information
Showing
2 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters