Bug 1300513 - readline slow to accept new characters when pasting input
readline slow to accept new characters when pasting input
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: readline (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Siteshwar Vashisht
Jan Houska
: EasyFix, FastFix, Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-20 22:40 EST by Daniel Villeneuve
Modified: 2017-08-01 16:33 EDT (History)
1 user (show)

See Also:
Fixed In Version: readline-6.2-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 16:33:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Daniel Villeneuve 2016-01-20 22:40:50 EST
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-20 22:42:18 EST
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 14:08:11 EDT
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 09:31 EST
Created attachment 1246267 [details]
readline62-003
Comment 5 Siteshwar Vashisht 2017-01-31 09:32:07 EST
Patch in comment 4 fixes the issue in RHEL
Comment 9 Jan Houska 2017-03-30 09:09:48 EDT
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 16:33:43 EDT
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.