-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move storage group handling into db.js & some tweaks
Storage group handling depends on the configuration and is stateful, so seems to be better placed in the DB class. Also: - Add keyspaceNameCache: hashing is quite expensive, and did show up at around 1% of total CPU usage in profiling. - Move `InternalRequest` to the end of the file, so that it doesn't break the flow of DB. The previous JSHint config patch makes that possible. - Make `_buildStorageGroups` side-effect free. - Optimize deleted row removal. Deletions are fairly rare, so filtering is not the fastest option in the common (no deletions) case. The filter function accounted for 50% of the time spent in db.js, and around 0.6% of total time.
- Loading branch information
Showing
2 changed files
with
137 additions
and
124 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