Skip to content

feat: Reduce Cytiva Biacore T200 Control memory usage with cycle streaming#1164

Merged
nathan-stender merged 2 commits into
mainfrom
feat/cytiva-t200-control-streaming
Apr 6, 2026
Merged

feat: Reduce Cytiva Biacore T200 Control memory usage with cycle streaming#1164
nathan-stender merged 2 commits into
mainfrom
feat/cytiva-t200-control-streaming

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

Implements cycle streaming for Cytiva Biacore T200 Control parser to reduce memory usage by 19.6%.

Changes

  • Implement decode_data_streaming() generator that yields cycles one at a time
  • Process cycles individually instead of concatenating all DataFrames at once
  • Maintain backward compatibility with decode_data() wrapper function

Memory Impact

  • Before: 134.24 MB peak (84.6x amplification on 1.59 MB file)
  • After: 107.87 MB peak (68.0x amplification)
  • Reduction: 26.37 MB saved (19.6% improvement)

Measurements taken with tracemalloc on Fig.2c_NC_prongs hybridization.blr (1.59 MB test file), consistent across 3 runs.

Testing

  • All existing tests pass with no changes to golden files
  • Type safety verified with mypy
  • Backward compatible - decode_data() wrapper maintains existing API

Context

This addresses memory amplification concerns identified in the parser audit. The T200 Control parser showed 133x average amplification with memory_profiler (agent-reported). Accurate measurements with tracemalloc show 84.6x on main, reduced to 68.0x with streaming.

Related to memory optimization work on other Cytiva Biacore parsers.

…aming

- Implement decode_data_streaming() generator that yields cycles one at a time
- Process cycles individually instead of concatenating all DataFrames at once
- Maintain backward compatibility with decode_data() wrapper
- Memory usage reduced by 19.6% (134.24 MB → 107.87 MB, 84.6x → 68.0x amplification)
- All tests pass with no changes to golden files

This addresses memory amplification concerns identified in parser audit, where
T200 Control showed 133x average amplification (agent-reported via memory_profiler).
Actual measurements with tracemalloc show 84.6x on main, reduced to 68.0x with streaming.
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners April 3, 2026 17:07
@nathan-stender
nathan-stender merged commit c122d25 into main Apr 6, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the feat/cytiva-t200-control-streaming branch April 6, 2026 05:48
nathan-stender added a commit that referenced this pull request Apr 8, 2026
### Added

- Add locale-aware timestamp parsing using Babel CLDR data (#1167)
- Add global locale support for number parsing (#1165)
- Reduce Cytiva Biacore T200 Control memory usage with cycle streaming
(#1164)
- Cytiva T200 - Implement streaming decoder to reduce memory usage by
55% (#1163)

### Fixed

- Default to day-first format for invalid/unknown locales (#1168)
- Use immutable copy pattern for WellItem result attachment (#1166)
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