Textfield: Entering characters is too slow

Description

Putting 32 characters into a barcode field one by one is very slow in Firefox and slow in Chrome in some environments.
Example:

Reproduce it using a barcode scanner, or hold down a key on your keyboard with fastest auto-repeat enabled, or quickly (and randomly) press many keys on your keyboard. (This does not occur when pasting 32 characters in one go.)

See attached video.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

3

Checklist

hide

TestRail: Results

Activity

Show:

Zak Burke October 9, 2018 at 1:27 PM

That test runs much faster today:
✓ should type 36 barcode characters (3765ms)
✓ should insert 36 barcode characters (1755ms)
but if I type as fast as possible, it feels like there's a debounce on the field. There is literally no visible change to the field until I stop typing, and then the whole string appears. If I type quickly but not too quickly, with a short but definite pause between each stroke, the debounce feeling goes away; the input is smooth.

Idle speculation: are we running redux-form validation functions via onChange?

Definitely warrants further investigation.

Julian Ladisch October 9, 2018 at 9:49 AM

Yes, this is still an issue.
The automated test posted on 29/Jun/18 is still slow on http://folio-testing.aws.indexdata.com :
√ should type 36 barcode characters (19436ms)
√ should insert 36 barcode characters (34280ms)

Jeffrey Cherewaty October 8, 2018 at 3:04 PM

Is this still an issue? There's a chance https://github.com/folio-org/stripes-components/pull/598 resolved it. We'll investigate further if still occurring.

Julian Ladisch June 29, 2018 at 12:47 PM

I've created an automated test to show how slow it is:
https://github.com/folio-org/ui-users/blob/STCOM-287-entering-characters-slow/test/ui-testing/type_barcode.js

How to run:
cd ui-testing
export FOLIO_UI_URL=http://folio-testing.aws.indexdata.com
yarn test-module -o --show --run=users:type_barcode

The result for http://folio-testing.aws.indexdata.com is:
√ should type 36 barcode characters (16890ms)
√ should insert 36 barcode characters (33152ms)

The result for http://folio-snapshot-stable.aws.indexdata.com is much faster but also too slow:
√ should type 36 barcode characters (3797ms)
√ should insert 36 barcode characters (5296ms)

Julian Ladisch June 19, 2018 at 12:09 PM

The textfield is still as slow as shown on the video of 2018-06-04.
The textfield is also slow on Chrome and Firefox when the browser runs on a Ubuntu machine. The faster the machine the faster the input.

Cannot Reproduce

Details

Assignee

Reporter

Priority

Development Team

Core: Platform

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created February 26, 2018 at 12:43 PM
Updated July 8, 2019 at 9:32 PM
Resolved July 8, 2019 at 9:32 PM
TestRail: Cases
TestRail: Runs