[Openmcl-devel] thread overview
alexcrain at mail2.widgetworks.com
Mon Aug 23 08:23:01 PDT 2004
On Aug 23, 2004, at 12:20 AM, Gary Byers wrote:
> Etc., etc. ... Context-switching isn't free, but I think that a modern
> CPU can switch contexts faster than you can type. I don't think that
> the fact that two threads are involved is as likely a culprit as the
> fact that some of the things those threads are doing is grossly
I've been digging a lot, and I suspect that neither of these answers is
I don't think that context switching is an inherent problem - the CPU
be able to context switch several hundred times per second - and while
the "linear string"<->"linked list of lines" code can probably be made
more efficient, there is a 300-500mS delay with every keystroke and my
gut says that the coding isn't responsible.
I'm thinking that there is a built in delay somewhere that is being
missed - maybe something in the cocoa window update update code that is
causing the wait.
I played around a little bit, and the delay happens well after the
character is passed to the "Self Insert" command code and the buffer is
updated on the hemlock side. I'm thinking somewhere on the cocoa side,
maybe the buffer update notification is taking awhile to get to the
hemlock window thread.
More information about the Openmcl-devel