Description
The tokenize_markdown function in src/lib.rs currently materialises the whole input as a Vec<char>, which duplicates the memory footprint of the string.
Location
- File:
src/lib.rs
- Lines: 231-233 (approximately)
- Function:
tokenize_markdown
Issue
The current implementation collects all characters into a Vec<char> which:
- Doubles the memory usage of the input string
- Creates unnecessary memory allocations
- Could impact performance for large inputs
Context
This performance issue was flagged in a previous review and was previously tracked in issue #63.
Backlinks
Requested by: @leynos
Description
The
tokenize_markdownfunction insrc/lib.rscurrently materialises the whole input as aVec<char>, which duplicates the memory footprint of the string.Location
src/lib.rstokenize_markdownIssue
The current implementation collects all characters into a
Vec<char>which:Context
This performance issue was flagged in a previous review and was previously tracked in issue #63.
Backlinks
Requested by: @leynos