Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
Improve the performance of tab replacement in common cases master
Summary: See PHI1210. For certain large inputs, we spend more time than we need to replacing tabs with spaces. Add some fast paths: - When a line only has tabs at the beginning of the line, we don't need to do as much work parsing the rest of the line. - When a line has no unicode characters, we don't need to vectorize it to get the right result. Test Plan: - Added test coverage. - Profiled this, got a ~60x performance increase on a 36,000 line 3MB text file. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20477
Author epriestley Date (May 16, 2019, 7:28 PM UTC) Commit 6bff2cee 6bff2cee22fcc8c4b4db31eb53d1dd54fdfc495a Parent c5ecc388 c5ecc388a21216fd569cfa06d0e32249fce3b51c