Skip to content

Improve whitespace trimming performance#225

Merged
jonschlinkert merged 4 commits intojonschlinkert:devfrom
dpkirchner:dev
Sep 27, 2016
Merged

Improve whitespace trimming performance#225
jonschlinkert merged 4 commits intojonschlinkert:devfrom
dpkirchner:dev

Conversation

@dpkirchner
Copy link
Copy Markdown

Excessive whitespace requires a lot of CPU to process. These commits replace the replace calls with substring calls.

David Kirchner added 4 commits July 22, 2016 15:14
The performance impact of the previous method was only felt on excessively
large lines of empty space surrounded by words. i.e. 'a      b  \n' but with
20k spaces between a and b.
The performance impact of the previous method was only felt when
including absurd amounts of whitespace inside of table cells, on
the order of 20k or so spaces between pipes.
@jonschlinkert jonschlinkert merged commit b78431f into jonschlinkert:dev Sep 27, 2016
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