Skip to content

Memory allocation concern in tokenize_markdown function #63

@coderabbitai

Description

@coderabbitai

The tokenize_markdown function in src/lib.rs at line 231 collects all characters of the input text into a Vec<char>, which allocates memory proportional to the text length. For very large markdown files, this could cause high memory usage.

Consider refactoring to use lazy iteration over characters instead of collecting them into a vector.

References:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions