Faster GUI text control
Paul McNett
p at ulmcnett.com
Sat May 14 00:47:11 EDT 2005
Jeremy Bowers wrote:
> The problem is that if you're really looking for performance, it may
> differ based on the characteristics of the text and the quality of the
> target computer, the platform (which you don't mention; GTK may scream in
> Linux and make you scream in Windows...), etc., and there may be no one
> person who can give you a firm "This is the best solution for your
> situation" answer.
Also, it must be said that thousands of lines of text in a GUI control
may not be necessary. Do the users really need to be able to scroll
through that much text all at once in the general case, or do they
perhaps only ever need to see the last few dozen lines? Could they
instead "page" through the text in swallowable morsels, say a couple
hundred lines at a time?
Python can handle gargantuan amounts of text with little noticable
performance penalty, while GUI controls aren't necessarily designed for
that. What I'm getting at is that you could still have the entire string
in memory, but only feed portions of that string to the GUI text control
at a time.
I'm jumping in here - perhaps the OP already told us what the
application is, but I'm curious why it is necessary to have thousands of
lines displayed and editable all at once, and wonder if the design
should be reconsidered. I know that native Windows controls in
particular tend to get really squirrly and unpredictable once you push
into thousands of lines.
--
pkm ~ http://paulmcnett.com
More information about the Python-list
mailing list