Skip to content

Optimized FusionEngineDecoder decode time and CPU usage. - #451

Merged
adamshapiro0 merged 10 commits into
masterfrom
decoder-performance
Nov 12, 2026
Merged

adamshapiro0 merged 10 commits into
masterfrom
decoder-performance

Conversation

@adamshapiro0

@adamshapiro0 adamshapiro0 commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

New Features

  • Add FusionEngineDecoder.num_sequence_gaps to count out-of-order sequence number occurrences

Changes

  • Reduce FusionEngineDecoder CPU usage, especially when filtering with message_types or using return_payload=False
    • About 2-4x faster when filtering to specific message types, and about 15% faster when decoding every message
  • Don't copy the message to compute its CRC in MessageHeader.validate_crc()
  • Precompile the struct formats of MessageHeader and all other message classes

Fixes

  • Pinned CI builds to Ubuntu 24.04 to resolve compiler availability after github switch to 26.04

adamshapiro0 and others added 8 commits November 10, 2026 18:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rc().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…urns.

Building the header object and resolving its message type for every message,
including the ones filtered out by message_types, took most of the decoder's
time when filtering.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamshapiro0
adamshapiro0 requested a review from anathan November 10, 2026 23:38
@adamshapiro0 adamshapiro0 self-assigned this Nov 10, 2026

@anathan anathan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm. benchmark shows similar perf to the custom parser when invoked properly.

adamshapiro0 and others added 2 commits November 12, 2026 12:28
…ilures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub moved ubuntu-latest to Ubuntu 26.04, which does not provide GCC 9,
GCC 10, Clang 14, or Python 3.8/3.9 for actions/setup-python. Pin those jobs
to Ubuntu 24.04, where they passed before, and match the Linux-only steps on
any ubuntu-* runner instead of only ubuntu-latest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adamshapiro0
adamshapiro0 merged commit 694bc38 into master Nov 12, 2026
27 checks passed
@adamshapiro0
adamshapiro0 deleted the decoder-performance branch November 12, 2026 18:14
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