AmokHuginnsson / replxx

A readline and libedit replacement that supports UTF-8, syntax highlighting, hints and Windows and is BSD licensed.
Other
691 stars 108 forks source link

Extremely slow when pasting large amount of text #58

Closed amosbird closed 4 years ago

amosbird commented 5 years ago

Perhaps adding bracketed paste mode would help. Might need to disable syntax highlighting and unicode parsing for the pasted text in bracket.

AmokHuginnsson commented 5 years ago

Can you please try using set_hint_delay() call and report results? (10ms should be enough)

amosbird commented 5 years ago

I tried disabling hint, it's faster, but still not desireable. Pasting 1M text runs forever. It might also worth to disable line wrapping but I didn't find the code

AmokHuginnsson commented 5 years ago

Can you check if current master fixes your issue?

amosbird commented 5 years ago

It's much better than before, but still hangs when pasting 1M text. https://la.wentropy.com/n55l.html

AmokHuginnsson commented 5 years ago

And now?

amosbird commented 5 years ago

It doesn't freeze now, taking about 30 seconds for pasting 1M text, however a readline based client only takes 4 seconds https://github.com/yandex/ClickHouse/blob/master/dbms/programs/client/Client.cpp#L649

AmokHuginnsson commented 4 years ago

@amosbird Is this issue solved with your contribution?

amosbird commented 4 years ago

Yeah, now pasting 1M text only takes 3 seconds.