Skip to content

Commit

Permalink
Fix extreme TextInput slowness on Android (facebook#19645)
Browse files Browse the repository at this point in the history
Summary:
This reverts 5898817 "Implement letterSpacing on Android >= 5.0".
Testing shows that that commit is the cause of facebook#19126, where in a
controlled TextInput after some text is first added, then deleted,
further interaction with the TextInput becomes extremely slow.

Fixes facebook#19126.

Tried the repro case from facebook#19126 without this change, then with it.
The issue reproduces, then doesn't.
Closes facebook#19645

Differential Revision: D8675230

Pulled By: hramos

fbshipit-source-id: e2c2d352ee781898721b2dff4738572d1a6b7471
  • Loading branch information
gnprice authored and Ivan committed Nov 30, 2018
1 parent 099410b commit 135e1b3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private static void buildSpannedFromShadowNode(
start, end, new BackgroundColorSpan(textShadowNode.mBackgroundColor)));
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (textShadowNode.mLetterSpacing != Float.NaN) {
if (!Float.isNaN(textShadowNode.mLetterSpacing)) {
ops.add(new SetSpanOperation(
start,
end,
Expand Down

0 comments on commit 135e1b3

Please sign in to comment.