-
Notifications
You must be signed in to change notification settings - Fork 444
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
db: fix regression in table cache hot path
A seemingly innocuous change in `tableCacheShard.findNode` resulted in a new allocation. We named the return variable, then we captured it in the `closeHook` callback, which I guess means that the pointer itself needs to be put on the heap. With this change `BenchmarkTableCacheHotPath` goes down from 1 alloc/op to 0, and the CRDB `RefreshRange/linear-keys/refresh_window=[99.00,99.00]` benchmark goes from 101 allocs/op to 61. Informs cockroachdb/cockroach#115215
- Loading branch information
1 parent
bc1b828
commit e08386b
Showing
1 changed file
with
17 additions
and
14 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