Skip to content

Added options to improve reader/decoder parsing efficiency. - #449

Merged
adamshapiro0 merged 10 commits into
masterfrom
mixed-log-reader-batch
Nov 2, 2026
Merged

adamshapiro0 merged 10 commits into
masterfrom
mixed-log-reader-batch

Conversation

@adamshapiro0

Copy link
Copy Markdown
Collaborator

New Features

  • Add MixedLogReader.read_batch(), which reads every message matching the reader's filters at once into a MessageBatch of numpy header arrays, much faster than iterating for logs with millions of messages
  • Add MessagePayload.unpack_array() for deserializing the fixed-size fields of every message in a batch at once, implemented for InputDataWrapperMessage
  • Add a message_types filter and return_payload option to FusionEngineDecoder

Changes

  • Skip the unnecessary CRC check when MixedLogReader reads using a file index

Fixes

  • Fix a MixedLogReader crash when return_payload is False

adamshapiro0 and others added 6 commits October 30, 2026 09:45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The indexer already validated every indexed message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It reads the headers of every selected message with numpy instead of one Python
call per message, which is much faster for logs with millions of messages.
Message classes can implement unpack_array() to deserialize their fields the
same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also added get_data() to get the wrapped data from a serialized payload without
deserializing the rest of the message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With return_payload=False, the decoder frames and validates messages without
deserializing them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamshapiro0
adamshapiro0 requested a review from bhers4 October 30, 2026 14:14
@adamshapiro0 adamshapiro0 self-assigned this Oct 30, 2026
Comment thread python/tests/test_message_batch.py Fixed
Comment thread python/tests/test_message_batch.py Dismissed

@bhers4 bhers4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Comment thread python/tests/test_message_batch.py Fixed
@adamshapiro0
adamshapiro0 merged commit 5672bcf into master Nov 2, 2026
27 checks passed
@adamshapiro0
adamshapiro0 deleted the mixed-log-reader-batch branch November 2, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants