Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Julia REPL is slow when pasting a large block of code. #15787

Closed
grinsted opened this issue Apr 7, 2016 · 23 comments
Closed

Julia REPL is slow when pasting a large block of code. #15787

grinsted opened this issue Apr 7, 2016 · 23 comments
Labels
REPL Julia's REPL (Read Eval Print Loop) system:windows Affects only Windows

Comments

@grinsted
Copy link
Contributor

grinsted commented Apr 7, 2016

If i copy/paste a large block of code spanning multiple lines directly into the REPL then it is really slow. It looks like each code block is backspaced away and then completely retyped for every character in the pasted block of code.

To illustrate: try copy/pasting this piece of code into the REPL
https://raw.githubusercontent.com/jheinen/GR.jl/master/examples/mandel.jl

@KristofferC
Copy link
Member

This is on windows right?

@grinsted
Copy link
Contributor Author

grinsted commented Apr 7, 2016

Yes. On Windows.

@KristofferC
Copy link
Member

Some related discussion: https://groups.google.com/forum/#!topic/julia-users/MoNy5BLIbSs and #7267

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2016

I've found that if you shrink the window to show just one line, windows cmd.exe is able to update the screen much faster

@vtjnash vtjnash added the system:windows Affects only Windows label Apr 7, 2016
@grinsted
Copy link
Contributor Author

grinsted commented Apr 7, 2016

Thank you. Additional info : it makes no difference if i use conemu or plain cmd.exe.

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2016

conemu is also backed by cmd.exe, it just hides the window and copies the text from that window, as it appears, onto the text area you can see.

@Keno
Copy link
Member

Keno commented Apr 7, 2016

I suppose Windows does not have bracketed paste mode. Is our heuristic to not redraw when inserting at the end not firing?

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2016

we don't have a heuristic for that, since the printing logic keeps the count of how many lines have been printed

@Keno
Copy link
Member

Keno commented Apr 7, 2016

I don't understand. We definitely used to have that heuristic. If the cursor is at the end of a non-full line, and we're inserting one character, there's no need to clear the screen.

@vtjnash
Copy link
Member

vtjnash commented Apr 7, 2016

true, the heuristic (in edit_insert – LineEdit.jl:449) looks like it isn't supposed to be using this information (which is likely private to refresh_multi_line – LineEdit.jl:1034)

@Keno
Copy link
Member

Keno commented Apr 7, 2016

Looks like somebody (probably me) just forgot that the position in the buffer is not the same as the column offset if there's multiple lines. Seems like that heuristic should be fixable.

@rennis250
Copy link
Contributor

It does this on Mac in iTerm2 but not in Terminal.app.

@tkelman tkelman added the REPL Julia's REPL (Read Eval Print Loop) label Apr 8, 2016
@KristofferC
Copy link
Member

KristofferC commented Aug 10, 2016

This should be significantly improved now with #17868. The original code is now pretty much instant to paste. Please reopen if there are still problems with the Windows pasting.

@Giannettig
Copy link

julia_slow_repl

I believe I am getting this again on Julia 1.1. - editor VSCode, Win10, ohMyRepl used in the example

@KristofferC
Copy link
Member

OhMyREPL makes this worse (on Windows).

@MaximilianJHuber
Copy link

MaximilianJHuber commented Mar 25, 2020

Please, reopen!

My REPL flickers heavily when I paste a large text. This is under Win10 and several Julia versions (at least 1.0.x, 1.3.0, and also 1.4.0).

capture
capture2

I posted this issue on Discourse to no avail.

@KristofferC KristofferC reopened this Mar 25, 2020
@StefanKarpinski
Copy link
Member

Are you using OhMyREPL?

@MaximilianJHuber
Copy link

No.

@MaximilianJHuber
Copy link

I just tried it on a MacOS 10.11.6 with Julia 1.3.0 and pasting works fine. The issue seems to be on Windows only.

@egoecho
Copy link

egoecho commented May 19, 2020

I suffered this problem on Emacs ansi-term for a long time.... Also, OhMyREPL makes it even worse.

@MaximilianJHuber
Copy link

On a Windows machine?

@egoecho
Copy link

egoecho commented May 19, 2020

No, on a macbook pro.

@musm
Copy link
Contributor

musm commented Aug 24, 2020

Edit. Pretty sure this is fixed on 1.6/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop) system:windows Affects only Windows
Projects
None yet
Development

No branches or pull requests