Skip to content

improve striptags performance#413

Merged
davidism merged 1 commit into2.1.xfrom
striptags
Jan 19, 2024
Merged

improve striptags performance#413
davidism merged 1 commit into2.1.xfrom
striptags

Conversation

@davidism
Copy link
Copy Markdown
Member

The regular expression method of finding anything between comment or tag marks can be slow on large input, especially if it doesn't contain an end mark. Instead, use some simple str.find calls to incrementally remove blocks. The code can be cleaned up in main by using := assignment expressions.

@davidism davidism added this to the 2.1.4 milestone Jan 19, 2024
@davidism davidism merged commit a24df39 into 2.1.x Jan 19, 2024
@davidism davidism deleted the striptags branch January 19, 2024 21:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant