Bug 1300513 - readline slow to accept new characters when pasting input
Summary: readline slow to accept new characters when pasting input
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: readline
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Siteshwar Vashisht
QA Contact: Jan Houska
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-21 03:40 UTC by Daniel Villeneuve
Modified: 2017-08-01 20:33 UTC (History)
1 user (show)

Fixed In Version: readline-6.2-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:33:43 UTC
Target Upstream Version:


Attachments (Terms of Use)
Makefile + slow-readline.c to demonstrate slow readline behavior (729 bytes, application/x-bzip)
2016-01-21 03:40 UTC, Daniel Villeneuve
no flags Details
readline62-003 (1.59 KB, patch)
2017-01-31 14:31 UTC, Siteshwar Vashisht
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1943 0 normal SHIPPED_LIVE readline bug fix update 2017-08-01 18:28:11 UTC

Description Daniel Villeneuve 2016-01-21 03:40:50 UTC
Created attachment 1116776 [details]
Makefile + slow-readline.c to demonstrate slow readline behavior

Description of problem:  when using readline to read lines in an application, the behavior is exceedingly slow when pasting text using the mouse


Version-Release number of selected component (if applicable): 6.2


How reproducible: compile the small program attached, run it, type in some lines followed by newlines, use Ctrl-p to recuperate past lines (this should be fast), then type a long line and <newline>, then cut-and-paste that line using the mouse (this should be slow).


Steps to Reproduce:
0. cd /tmp && tar jxf slow-readline.tar.bz2 && cd slow-readline
1. make
2. ./slow-readline
3. follow instructions in preceding paragraph

Actual results:
- fast with Ctrl-p
- slow with mouse pasting


Expected results:
- fast with Ctrl-p and with mouse pasting (as in bash, for example)


Additional info:

Comment 1 Daniel Villeneuve 2016-01-21 03:42:18 UTC
One possible solution could be to check/apply the following patch:

ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-003

Comment 3 Daniel Villeneuve 2016-08-11 18:08:11 UTC
The problem is still there with the latest RH7.2 updates.

uname -a

Linux XXXX 3.10.0-327.28.2.el7.x86_64 #1 SMP Mon Jun 27 14:48:28 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

rpm -qa|grep readline

readline-devel-6.2-9.el7.x86_64
readline-6.2-9.el7.x86_64
readline-6.2-9.el7.i686

Comment 4 Siteshwar Vashisht 2017-01-31 14:31:24 UTC
Created attachment 1246267 [details]
readline62-003

Comment 5 Siteshwar Vashisht 2017-01-31 14:32:07 UTC
Patch in comment 4 fixes the issue in RHEL

Comment 9 Jan Houska 2017-03-30 13:09:48 UTC
Verified,

OLD FAIL  the insertion was slow, the text appeared slowly - letter by letter. 
NEW PASS  the insertion was fast, whole line just appear at once.

Comment 10 errata-xmlrpc 2017-08-01 20:33:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1943


Note You need to log in before you can comment on or make changes to this bug.