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 weberjc committed Nov 1, 2018
1 parent 55b4d91 commit 243e7dd
Showing 1 changed file with 1 addition and 1 deletion.
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 243e7dd

Please sign in to comment.