[Tkinter-discuss] Text widget "lags" when doing fast updates with increased window heights

Thiago Padilha tpadilha84 at gmail.com
Tue Jun 10 23:59:40 CEST 2014


I'm currently implementing a sample UI for neovim(http://neovim.org/),
and decided to use Tkinter/python due to the popularity/simplicity of
the platforms. The problem I'm having is that tkinter seems to "stack"
UI updates when the window height crosses a certain threshold.

Here is a video that shows the problem: http://youtu.be/sgE2C9lLqQQ

The right window is a terminal emulator running neovim, and the left
window is the Tkinter UI program connected to neovim. The idea is that
the tkinter UI should mirror neovim terminal screen, including
dimensions. Notice that in this video I don't take focus away from the
terminal window, so the only events Tk has to process come from the
connection to neovim(virtual <<nvim>> events which describe screen
updates)

The first part of the video shows that everything works nicely when
the window height is small, but starts to lag updates when I increase
the height.

I think what I'm trying to implement is close to a terminal
emulator(must handle large bursts of text updates efficiently) but I'm
very inexperienced in GUI programming. Is Tkinter a wise choice for
this task? If yes, then what am I doing wrong?(

The code for the Tkinter program is here: http://pastebin.com/0c8cjsmR
and my OS is ubuntu 12.04(running as a VM under windows 7)

Thanks in advance

Thiago.


More information about the Tkinter-discuss mailing list