Skip to content

Refactor/lazy parsing remove sentinel in parser#26

Merged
Kernel236 merged 6 commits into
devfrom
refactor/lazy-parsing-remove-sentinel-in-parser
Mar 26, 2026
Merged

Refactor/lazy parsing remove sentinel in parser#26
Kernel236 merged 6 commits into
devfrom
refactor/lazy-parsing-remove-sentinel-in-parser

Conversation

@Kernel236

Copy link
Copy Markdown
Owner

avoid completely to upload data in ram during parsing phase. Solve issue #24

DragerBinParser.parse() now returns the raw memmap directly without
copying to RAM or replacing sentinel values (-1000.0, 0xFF7FC99E).
Sanitization is the responsibility of the preprocessing layer, which
ensures files are never loaded into RAM during batch parsing.

- Remove steps 6-8 (copy + replace_sentinels for pixels and Medibus)
- Remove _FLOAT_SENTINELS/_BIT_SENTINELS/_replace_no_data_sentinels imports
- Remove __init__ sentinel lists (no longer needed in parser)
- Update test: sentinel values are now preserved in raw parser output
parse_memmap() now returns raw memmap pixels without calling
replace_no_data_sentinels — consistent with the parser layer change.
Sentinel values are preserved; replacement is preprocessing responsibility.
parse_memmap() now returns a lazy view with no pixel array allocated in RAM.
Update interpretation to reflect that sentinel replacement is deferred and
memmap peak RAM is near zero (only virtual mapping overhead).
Re-run after removing sentinel replacement from parse_memmap():
- memmap time: 0.000 s at all sizes (pure mapping setup, no pixel reads)
- memmap peak RAM: 0.0 MB (no pixel array allocated — lazy view only)
- struct loop unchanged as expected

Fix grammar in interpretation cell.
Remove redundant inline comment in test_bin_parser.py.
@Kernel236 Kernel236 added this to the v 0.1.0 milestone Mar 26, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Kernel236 Kernel236 closed this Mar 26, 2026
@Kernel236

Copy link
Copy Markdown
Owner Author

failed gitworkflow

@Kernel236 Kernel236 reopened this Mar 26, 2026
@Kernel236

Copy link
Copy Markdown
Owner Author

failed gitworkflow

@Kernel236 Kernel236 closed this Mar 26, 2026
@Kernel236 Kernel236 reopened this Mar 26, 2026
@Kernel236 Kernel236 merged commit 8ba5e97 into dev Mar 26, 2026
14 checks passed
@Kernel236 Kernel236 deleted the refactor/lazy-parsing-remove-sentinel-in-parser branch March 26, 2026 23:05
@Kernel236

Copy link
Copy Markdown
Owner Author

fixed. GH action

@Kernel236

Copy link
Copy Markdown
Owner Author

close issue #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants