ProfileView.jl
ProfileView.jl copied to clipboard
Importing ProfileView slows down keyboard input and crashes AutoHotkey
I'm on Windows 10, Julia 1.7.0.
Running using ProfileView
(after it's installed in the current env, v1.5.1) makes the keyboard unresponsive or very slow to respond, for about 30 seconds after the command has returned.
In addition, if have an AutoHotkey script running during the import command, the script stops working and I have to restart it.
It's not a big issue; I'm just posting this here for if there are other Julia users with this problem and wondering where it comes from (I had a large list of packages imported, and by elimination narrowed the problem down to ProfileView).
edit: still in Julia 1.8.1
I can verify this, and I'd call it a big issue. Does it happen for you with using Gtk
?
It does indeed.
Seems like it is downstream and known:
- https://github.com/JuliaGraphics/Gtk.jl/issues/629
- https://github.com/JuliaGraphics/Gtk.jl/issues/325
- https://gitlab.gnome.org/GNOME/gtk/-/issues/2015 "Gdk-Win32 backend installs a low level keyboard hook at startup" → this is what messes with AutoHotkey I suppose
As suggested by @jwahlstrand, having ENV["GTK_AUTO_IDLE"] = false
before importing fixes it.
This issue also appears in julia 1.9.2, https://discourse.julialang.org/t/profileview-jl-makes-my-computer-lag/
ENV["GTK_AUTO_IDLE"] = false
still works. I think however we should not do this manually. The fix itself is not a big deal, but imagine your keyboard being super laggy and nearly un-usable and you don't know why. Users spend a few hours until they figure out is ProfileView/Gtk. Is it possible for ProfileView to automatically call ENV["GTK_AUTO_IDLE"] = false
when using
it? (only on windows machines)
Edit: If I think better ENV["GTK_AUTO_IDLE"] = false
shall be done in the Gtk package, not inside ProfileView.
https://github.com/JuliaGraphics/Gtk.jl/pull/692 may fix it once and for all