From cd8950559d7df2b8c79009739195b2617f32a54e Mon Sep 17 00:00:00 2001 From: Jonathan Diamond Date: Wed, 4 Oct 2023 08:38:13 -0700 Subject: [PATCH] Additional comments. --- python/fusion_engine_client/parsers/fast_indexer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/fusion_engine_client/parsers/fast_indexer.py b/python/fusion_engine_client/parsers/fast_indexer.py index d2583433..048bbace 100644 --- a/python/fusion_engine_client/parsers/fast_indexer.py +++ b/python/fusion_engine_client/parsers/fast_indexer.py @@ -66,10 +66,13 @@ def _search_blocks_for_fe(input_path: str, block_starts: List[int]): num_syncs += len(sync_matches) - # To do the CRC check and find a p1_time the full message needs to be parsed. + # To do the CRC check and find a p1_time the full message needs to be parsed. This + # section is not particularly optimized. The chance of the preamble appearing in data + # is relatively low, so this code is in a much less hot path then the preamble sync above. for i in sync_matches: absolute_offset = i + block_offset - # Don't check preambles found inside other valid messages. + # Don't check preambles found inside other valid messages. Generally, this didn't + # provide much speed up, but could prevent wasting cycles if the message size is large. if absolute_offset < message_end: continue