Skip to content

Conversation

@bdarcus
Copy link
Owner

@bdarcus bdarcus commented Jan 23, 2026

In particular, allocations and error handling.

@bdarcus bdarcus force-pushed the refactor/optimize-rust-pro branch from 967c065 to 38a60fc Compare January 23, 2026 18:02
Refactor the processor crate to improve performance and code
quality.

Key changes:
- Optimize refs_to_string in render.rs by replacing
  map/collect/join chain with a single for loop and
  write!. This reduces intermediate string allocations
  significantly, improving memory efficiency for large
  bibliographies.
- Introduce ProcessorError enum in error.rs using
  thiserror to provide strongly typed, descriptive errors
  instead of bare Strings.
- Update Processor methods to return
  Result<..., ProcessorError> for better error propagation.
- Clean up debug println! statements and improve comments
  throughout the crate.
- Update lib.rs to export the new error module.
@bdarcus bdarcus force-pushed the refactor/optimize-rust-pro branch from 38a60fc to cc8ea27 Compare January 23, 2026 18:04
@bdarcus bdarcus merged commit 4b92a9f into main Jan 23, 2026
6 checks passed
@bdarcus bdarcus deleted the refactor/optimize-rust-pro branch January 23, 2026 18:39
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