# Serious issue: Julia language Keyboard Lag Typing Very Slow

**URL:** https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081
**Category:** Performance
**Tags:** windows, bug
**Created:** [December 10, 2019, 4:41am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081 "2019-12-10T04:41:45Z")
**Posts on this page:** 16
**Page:** 3

<div class="post-metadata">

### Author: ![JosephPollacco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josephpollacco/32/51404_2.png) [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)
#### Post date: [February 13, 2020, 11:05pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/41 "2020-02-13T23:05:57Z")

</div>

Will Winston plotting package be further maintained 😃 ?

---

<div class="post-metadata">

### Author: ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)
#### Post date: [February 14, 2020, 12:04am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/42 "2020-02-14T00:04:10Z")

</div>

> [@tobias.knopp](#):
>
> What is the motivation of using Tk instead of Gtk?

Not have the windows slowdown issue?

But since I’m not doing any of the work, this is very speculative suggestion. I’m only half serious.

---

<div class="post-metadata">

### Author: ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)
#### Post date: [February 14, 2020, 12:05am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/43 "2020-02-14T00:05:29Z")

</div>

No, none of this has happened, or is likely to happen very soon, or at all.

---

<div class="post-metadata">

### Author: ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)
#### Post date: [February 14, 2020, 7:56am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/44 "2020-02-14T07:56:25Z")

</div>

I would prefer fixing the bug instead of going back from where we came. The switch from Tk to Gtk was actually a move not only of a single package but of multiple, think of ImageView, which was completely rewritten by @tim.holy to exploit the advantages that Gtk gives us. I know this does not solve the slowdown problem but I want to make clear that quite some thoughts went into the decision of switching to Gtk.

---

<div class="post-metadata">

### Author: ![jonathanBieler](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@jonathanBieler](https://discourse.julialang.org/u/jonathanBieler)
#### Post date: [February 14, 2020, 9:44am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/45 "2020-02-14T09:44:49Z")

</div>

I tried to run Gtk’s [main loop](https://github.com/JuliaGraphics/Gtk.jl/blob/e9127e73466e4f348adc0ee09c0eb50120edb934/src/Gtk.jl#L132) in a thread instead of a task the other day, but that led to a swift segfault.

---

<div class="post-metadata">

### Author: ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)
#### Post date: [February 14, 2020, 10:40am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/46 "2020-02-14T10:40:43Z")

</div>

For me the question is more why we need all stuff here: [Gtk.jl/signals.jl at master · JuliaGraphics/Gtk.jl · GitHub](https://github.com/JuliaGraphics/Gtk.jl/blob/master/src/GLib/signals.jl#L349)  
Why can’t we just use the regular main loop of Gtk. It has some downsides because one would loose the REPL but this it is regularly done (see [2. Getting Started — Python GTK+ 3 Tutorial 3.4 documentation](https://python-gtk-3-tutorial.readthedocs.io/en/latest/introduction.html#simple-example))

---

<div class="post-metadata">

### Author: ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)
#### Post date: [February 8, 2022, 7:39pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/47 "2022-02-08T19:39:10Z")

</div>

Several people in my group have this problem on Microsoft Windows [Version 10.0.19044.1466].

Whenever julia is executing code keyboard response is incredibly slow in all other applications. The computer is unusable until Julia finishes.

Has this been fixed? Is there a workaround?

---

<div class="post-metadata">

### Author: ![SortofDamocles](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sortofdamocles/32/15709_2.png) [@SortofDamocles](https://discourse.julialang.org/u/SortofDamocles)
#### Post date: [February 12, 2022, 1:13am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/48 "2022-02-12T01:13:49Z")

</div>

I am seeing this on 1.7.1, in VSCode (Win11), but _only_ after exit() in the REPL and restarting. Typing lag is very bad, but the UI is still responsive – I can move the cursor with the mouse, and the buffered keypresses continue very slowly to appear in the new cursor location. It’s weird, but it only lasts a few seconds so I have just gotten used to waiting for it to finish. Resource Monitor doesn’t show anything suspicious while it’s happening.

---

<div class="post-metadata">

### Author: ![JosephPollacco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josephpollacco/32/51404_2.png) [@JosephPollacco](https://discourse.julialang.org/u/JosephPollacco)
#### Post date: [February 18, 2022, 4:59am UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/49 "2022-02-18T04:59:59Z")

</div>

Hallo, what plotting software are you using or GUI you are using ?

---

<div class="post-metadata">

### Author: ![brianguenter](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brianguenter/32/29519_2.png) [@brianguenter](https://discourse.julialang.org/u/brianguenter)
#### Post date: [February 19, 2022, 7:50pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/50 "2022-02-19T19:50:54Z")

</div>

I also frequently encounter very slow keyboard response when Julia is running on Windows 10 and 11, and not just when running GUI applications.

It happens when compiling packages, running multithreaded code, anything that keeps the Julia system busy. For some reason this interferes with keyboard processing on Windows. It’s been this way for years, which is why I much prefer running Julia on Linux.

Surprisingly, this does not happen when running Julia in Windows Subsystem for Linux rather than directly in Windows. Keyboard response is snappy even though it is doing at least as much processing as running directly under Windows.

This is a slightly awkward way to work but at least the computer is usable when Julia is running.

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [February 20, 2022, 4:55pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/51 "2022-02-20T16:55:17Z")

</div>

> [@brianguenter](#):
>
> It happens when compiling packages, running multithreaded code

Interesting. I’m not on Windows, so can’t compare, but it seems like you’re just using to many threads or process. Does Linux for sure use as many (or WSL)? FYI: For compiling packages, i.e. precompiling many, there is an ENV variable to limit how many. I forget the name, but it seems like the default should be lower (at least on Windows). How many cores do you have, and is this the experience of most Windows users?!

---

<div class="post-metadata">

### Author: ![zp3](https://avatars.discourse-cdn.com/v4/letter/z/7cd45c/32.png) [@zp3](https://discourse.julialang.org/u/zp3)
#### Post date: [April 12, 2023, 5:11pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/53 "2023-04-12T17:11:32Z")

</div>

Same problem on Windows/VScode/Julia (latest stable versions at the time of writing). Finally, in my case I could trace it back to the package ‘ProfileView’. As soon as I type ‘using ProfileView’ I get a huge keyboard lag which renders VScode completly useless. The lag is present even outside VScode (everywhere, seems to be on system level). When I close the REPL, the lag disappears. TaskManager isn’t showing any busy processes. Maybe it has something to do with the whole graphic stack, I get some warnings about ‘Xorg\_\*\_jll not stored on disc’ - no idea if this is responsible for the lag…

---

<div class="post-metadata">

### Author: ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)
#### Post date: [April 12, 2023, 10:46pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/54 "2023-04-12T22:46:02Z")

</div>

I do see that too. For a long time.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [March 25, 2024, 9:02pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/55 "2024-03-25T21:02:14Z")

</div>

March 2024 Report:  
On Windows 10 with Julia 1.10.0 and also experiencing extremely sluggish Windows keyboard after typing `using MyPackage` (which happens to use Gtk).  
However, when I run a function in `MyPackage` that uses terminal input, all keyboard typing starts working at normal speed (inside Julia program and in all other Windows applications).

---

<div class="post-metadata">

### Author: ![jonathanfischer97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonathanfischer97/32/50242_2.png) [@jonathanfischer97](https://discourse.julialang.org/u/jonathanfischer97)
#### Post date: [April 30, 2024, 8:37pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/56 "2024-04-30T20:37:46Z")

</div>

Have substantial keyboard lag (~2 s) when trying to type in the VSCode integrated terminal REPL after first starting Julia.

On an Ubuntu 20.04 machine running 1.10.3. First appeared for me a few releases ago, 1.10.1 I think.

---

<div class="post-metadata">

### Author: ![jonathanfischer97](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonathanfischer97/32/50242_2.png) [@jonathanfischer97](https://discourse.julialang.org/u/jonathanfischer97)
#### Post date: [July 23, 2024, 4:01pm UTC](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081/57 "2024-07-23T16:01:26Z")

</div>

Just want to mention that this issue has improved substantially for me since my last reply (still a slight lag, but half a second at most).

Only just noticed it now, but perhaps coincided with the release of 1.10.4. So if this was intentional, bravo to whoever was responsible!

[Previous page](https://discourse.julialang.org/t/serious-issue-julia-language-keyboard-lag-typing-very-slow/32081.md?page=2)
