rocksdb/table/block_based
Andrew Kryczka 7bf6d4c9d5 Lazily construct BlockBasedTableIterator::block_handles_ (#12616)
Summary:
Our external benchmark attributed a CPU regression to https://github.com/facebook/rocksdb/issues/11860. Based on the CPU profile the new overhead is from `std::deque`. The deque is always empty for these scans so we do not need to construct it. This PR lazily constructs it only when it is needed.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12616

Test Plan:
- Command: `TEST_TMPDIR=/dev/shm ./db_bench -benchmarks=filluniquerandom,seekrandom[-X10] -compression_type=none -disable_auto_compactions=true -write_buffer_size=524288 -value_size=1024 -num=10000 -reads=100000`
- Results
  - Before this PR: `seekrandom [AVG    10 runs] : 47811 (± 431) ops/sec`
  - After this PR: `seekrandom [AVG 10 runs] : 51013 (± 632) ops/sec`

Reviewed By: jaykorean

Differential Revision: D56954136

Pulled By: ajkr

fbshipit-source-id: b4d34c9b6c6c2e83d4fff06deacb9f0df2ad042f
2024-05-03 17:18:13 -07:00
..
binary_search_index_reader.cc
binary_search_index_reader.h
block.cc Add initial support for TimedPut API (#12419) 2024-03-14 15:44:55 -07:00
block.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
block_based_table_builder.cc Prevent data block compression with BlockBasedTableOptions::block_align (#12592) 2024-04-26 20:05:30 -07:00
block_based_table_builder.h Fix/cleanup SeqnoToTimeMapping (#12253) 2024-01-19 21:50:38 -08:00
block_based_table_factory.cc Prevent data block compression with BlockBasedTableOptions::block_align (#12592) 2024-04-26 20:05:30 -07:00
block_based_table_factory.h
block_based_table_iterator.cc Lazily construct BlockBasedTableIterator::block_handles_ (#12616) 2024-05-03 17:18:13 -07:00
block_based_table_iterator.h Lazily construct BlockBasedTableIterator::block_handles_ (#12616) 2024-05-03 17:18:13 -07:00
block_based_table_reader.cc Fix kBlockCacheTier read when merge-chain base value is in a blob file (#12462) 2024-03-21 12:38:53 -07:00
block_based_table_reader.h Support returning write unix time in iterator property (#12428) 2024-03-15 15:37:37 -07:00
block_based_table_reader_impl.h Fix various failures in auto_readahead_size (#11884) 2023-10-02 17:47:24 -07:00
block_based_table_reader_sync_and_async.h Don't swallow errors in BlockBasedTable::MultiGet (#12486) 2024-03-28 13:56:28 -07:00
block_based_table_reader_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
block_builder.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
block_builder.h Logically strip timestamp during flush (#11557) 2023-06-29 15:50:50 -07:00
block_cache.cc Support compressed and local flash secondary cache stacking (#11812) 2023-09-21 20:30:53 -07:00
block_cache.h Support compressed and local flash secondary cache stacking (#11812) 2023-09-21 20:30:53 -07:00
block_prefetcher.cc Refactor FilePrefetchBuffer code (#12097) 2024-01-05 09:29:01 -08:00
block_prefetcher.h Refactor FilePrefetchBuffer code (#12097) 2024-01-05 09:29:01 -08:00
block_prefix_index.cc
block_prefix_index.h
block_test.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
block_type.h
cachable_entry.h
data_block_footer.cc
data_block_footer.h
data_block_hash_index.cc
data_block_hash_index.h
data_block_hash_index_test.cc Rename IntTblPropCollector -> InternalTblPropColl (#12320) 2024-02-02 14:14:43 -08:00
filter_block.h
filter_block_reader_common.cc Avoid double block cache lookup during Seek with async_io option (#11616) 2023-09-18 11:32:30 -07:00
filter_block_reader_common.h
filter_policy.cc Set optimize_filters_for_memory by default (#12377) 2024-04-30 08:33:31 -07:00
filter_policy_internal.h Make RibbonFilterPolicy::bloom_before_level mutable (SetOptions()) (#11838) 2023-09-15 15:46:10 -07:00
flush_block_policy.cc
flush_block_policy_impl.h
full_filter_block.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
full_filter_block.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
full_filter_block_test.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
hash_index_reader.cc
hash_index_reader.h
index_builder.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
index_builder.h Fix some bugs in index builder and reader for the UDT in memtable only feature (#12062) 2023-11-21 14:05:02 -08:00
index_reader_common.cc Avoid double block cache lookup during Seek with async_io option (#11616) 2023-09-18 11:32:30 -07:00
index_reader_common.h
mock_block_based_table.h
parsed_full_filter_block.cc
parsed_full_filter_block.h
partitioned_filter_block.cc Refactor FilePrefetchBuffer code (#12097) 2024-01-05 09:29:01 -08:00
partitioned_filter_block.h Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
partitioned_filter_block_test.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
partitioned_index_iterator.cc Refactor FilePrefetchBuffer code (#12097) 2024-01-05 09:29:01 -08:00
partitioned_index_iterator.h
partitioned_index_reader.cc Refactor FilePrefetchBuffer code (#12097) 2024-01-05 09:29:01 -08:00
partitioned_index_reader.h
reader_common.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
reader_common.h Remove unnecessary, confusing 'extern' (#12300) 2024-01-29 10:38:08 -08:00
uncompression_dict_reader.cc Avoid double block cache lookup during Seek with async_io option (#11616) 2023-09-18 11:32:30 -07:00
uncompression_dict_reader.h