forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
json: Use JSON maps instead of string hashes for objects.
Use of shash requires copying of the keys every time a new JSON object is constructed. We're spending a lot of CPU and memory resources on copying column names into objects for every database row, we copy all the sets between database datum and JSON objects, and we copy all the keys in maps. Let's use jsmap instead of an shash as a base data structure for JSON objects. That will allow sharing keys between the ovsdb_datum and JSON objects using reference counting, because keys will be now JSON structures (JSON_STRING) instead of plain byte arrays. This commit, however, is only a ground work replacing the base data structure and updating all the users. No functional changes are done here. If anything, it can make performance a little worse until the optimizations are done in the next commits. Signed-off-by: Ilya Maximets <[email protected]>
- Loading branch information
Showing
23 changed files
with
358 additions
and
350 deletions.
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
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
Oops, something went wrong.