octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Race condition seems to be fixed


From: Michael Goffioul
Subject: Re: Race condition seems to be fixed
Date: Mon, 21 May 2012 14:54:02 +0100

On Mon, May 21, 2012 at 2:48 PM, Jacob Dawid <address@hidden> wrote:
2012/5/21 Michael Goffioul <address@hidden>
On Mon, May 21, 2012 at 1:38 PM, Jacob Dawid <address@hidden> wrote:
Just to clarify: Why do you think the readline callback should be used? What does it do better?

Because that would cover all cases. Readline input hooks are called regularly when octave is idle, whether at normal prompt, or during debugging, or after executing other input hooks, and so on...

Michael.

Michael,

I would regard this as an argument against using the readline input hook. Comparing and updating the model is an expensive task and we should avoid doing it whenever possible. When I bloat the symbol table with 10000 variables it takes multiple second to check and rebuild model - you can't expect it to run every 0.1s at max. Sure, this is a target for optimization (I think of hashing the symbol table before actually comparing it variable by variable), but nevertheless we shouldn't stress it I think.

You're right, performances may decrease. That's also why I think it's worth considering the problem the other way around: let octave tell you when you need to update the variable browser. In the end, octave is the one who should know whether something change in the current scope. If you had such flag, the readline input hook could be very light.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]