1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-12 15:51:04 +01:00
phorge-phorge/src
epriestley 6bff2cee22 Improve the performance of tab replacement in common cases
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
2019-05-16 12:28:39 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront Add "Move Left" and "Move Right" to dashboard tab panels 2019-05-01 15:35:53 -07:00
applications Improve the performance of tab replacement in common cases 2019-05-16 12:28:39 -07:00
docs Update "Autoclose" documentation to focus on "Permanent Refs" instead 2019-04-18 05:43:15 -07:00
extensions
infrastructure Make very minor generality improvements to the scope selector 2019-04-30 06:52:29 -07:00
view Show "hold reasons" on commit page, not on "Edit" page 2019-04-25 09:22:49 -07:00
__phutil_library_init__.php
__phutil_library_map__.php Improve the performance of tab replacement in common cases 2019-05-16 12:28:39 -07:00