Skip to content

Feat/cs/project parser bytes - #811

Open
ReagentX wants to merge 12 commits into
developfrom
feat/cs/project-parser-bytes
Open

ReagentX wants to merge 12 commits into
developfrom
feat/cs/project-parser-bytes

Conversation

@ReagentX

@ReagentX ReagentX commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Changes

  • Parse body and edit data directly from borrowed SQLite row bytes
    • Return messages with parsed body fields
    • Remove the public parse/apply lifecycle and obsolete body loader
    • HTML export time decreased ≈5% and TXT ≈8%, with ≈15 MB more peak memory
    • Preserve recovered body components and edit/unsent metadata when legacy text parsing fails

Migration guide:

Message queries now populate text, components, and edited_parts automatically. What was previously expressed as:

let mut message = Message::from_guid(guid, &db, &capabilities)?;
if let Ok(body) = message.parse_body(&db) {
    message.apply_body(body);
}

is now much more elegantly expressed as:

let message = Message::from_guid(guid, &db, &capabilities)?;

The same applies to messages returned by streaming, row iteration, and reply queries. Query and callback signatures are unchanged.

  • Breaking changes:
    • parse_body, apply_body, and ParsedBody have been removed.
    • attributed_body() and generate_text_legacy() are removed. Use the populated message fields; raw bytes remain accessible through SQL or Table::get_blob.
    • Custom SQL should project the available attributedBody, message_summary_info, and (payload_data IS NOT NULL) AS has_payload_data inputs. Raw payload_data from m.* is also supported. Cast text-valued
      parser inputs to BLOB in UTF-16 databases.

@ReagentX ReagentX self-assigned this Sep 20, 2026
@ReagentX ReagentX added crate: database Related to the database crate enhancement Requires updating an existing feature labels Sep 20, 2026
@ReagentX
ReagentX requested a balanced review from Copilot September 20, 2026 00:47

This comment was marked as resolved.

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

Labels

crate: database Related to the database crate enhancement Requires updating an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants