[Urwid] Re: Unbearable slowness in UTF-8 mode

Ian Ward ian at excess.org
Mon Oct 16 21:53:25 EDT 2006

Nuutti Kotivuori wrote:
> There is only one case where I could get a noticeable slowdown - and
> that was an edit field where I wrote around 20 lines of the japanese
> character 'a'. After that, every keypress took like a second to be
> processed. But the only thing alleviating that would be to actually
> make the calc_width calculation fast somehow. Pyrex or calling the
> system wcwidth or something.

I can make calc_width and calc_text_pos (the one that will be important 
for Edit widgets) faster by using re.subn in some fancy ways.  However, 
I don't know if I want to go down that path because it would obfuscate 
the code.  Another option is to write those functions in C, but that 
would mean distributing compiled binaries..

If Urwid's performance is acceptable the way it is now?


More information about the Urwid mailing list