Revision a661c0d2085b6de1ff745eb83f056a87801985b4 authored by Maysam Yabandeh on 27 February 2019, 00:52:20 UTC, committed by Facebook Github Bot on 27 February 2019, 00:56:19 UTC
Summary:
The read path includes a callback function, ReadCallback, which would eventually calls IsInSnapshot to figure if a particular seq is in the reading snapshot or not. This callback is virtual, which adds the cost of multiple virtual function call to each read. The first few checks in IsInSnapshot, however, are quite trivial and take care of majority of the cases. The patch moves those to a non-virtual function in the the parent class, ReadCallback, to lower the virtual callback cost.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5018

Differential Revision: D14226562

Pulled By: maysamyabandeh

fbshipit-source-id: 6feed5b34f3b082e52092c5ef143e29b49c46b44
1 parent bb474e9
History
File Mode Size
checkpoint_impl.cc -rw-r--r-- 12.3 KB
checkpoint_impl.h -rw-r--r-- 2.1 KB
checkpoint_test.cc -rw-r--r-- 22.6 KB

back to top