|
From: Cliff W. <log...@ea...> - 2002-01-02 20:37:18
|
On Wed, 2 Jan 2002 12:01:46 -0800
"Kevin Altis" <al...@se...> wrote:
>
> Okay, let's try some new wxWindows methods, Freeze and Thaw and see if
they
> help.
>
> if used or (not self.hideUnused.GetValue()):
> self.msgHistory.Freeze()
> while self.msgHistory.GetLastPosition() > 29000:
> # delete first line of history
> self.msgHistory.Remove(0, self.msgHistory.XYToPosition(0,
> 1))
> self.msgHistory.Thaw()
> self.msgHistory.AppendText(eventText)
Calling Freeze/Thaw for every message slows it down too much, try this
instead:
if used or (not self.hideUnused.GetValue()):
while self.msgHistory.GetLastPosition() > 29000:
self.msgHistory.Freeze()
# delete first line of history
#print self.msgHistory.GetLineLength(0),
self.msgHistory.XYToPosition(0, 1)
self.msgHistory.Remove(0, self.msgHistory.XYToPosition(0,
1))
self.msgHistory.Thaw()
self.msgHistory.AppendText(eventText)
#print self.msgHistory.GetLastPosition()
This way they're only called when deleting from the list. BTW, yes this
seems to fix it.
--
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308
|