[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40319] deleting script file in a function/scr
From: |
Lachlan Andrew |
Subject: |
[Octave-bug-tracker] [bug #40319] deleting script file in a function/script doesn't update the symbol table |
Date: |
Thu, 2 Jun 2016 00:59:13 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0 |
Follow-up Comment #9, bug #40319 (project octave):
Pantxo, your patch looks compact. However, the rehash may be quite slow, and
it quite likely that user code would call "exist" often to see if a variable
exists (without specifying that), which doesn't need the rehash.
A more invasive patch would be to store a flag recording whether any file has
been created or destroyed since the last command prompt, and only rehash if
that is the case.
That would require checking for all Octave functions that create or delete
files, and possibly also setting the flag if an OCT/MEX file has been run,
since they may create files directly.
I'm not sure if the increased complexity is worth it for the increase in
speed.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40319>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/