On Thu, 06 Mar 2008 22:40:47 +0200 Yura Siamashka yurand2@gmail.com wrote:
Hi
On Thu, 2008-03-06 at 17:11 +0100, Enrico Tröger wrote:
Remote filesystems are one reason, another reason is that this is IMO just unnecessary disk-IO which should be avoided. Think of hard drive life times and maybe it can be also a performance issue on older systems with older hard drives or when the hard drive is quite busy. I really don't like this, it can cause heavy load when switching between several times quickly.
IMHO, you are wrong about heavy load. It is just 1-3 access() call when you switch tab. It is not like geanyprj nuke disk every second or on every editing operation.
reload_project() is probably bad function name. It doesn't actually reload project every time. This happen only if path to project file is changed.
I think reading a project file on disk when switching to a document that 'belongs' to another project is OK (so long as it's not read more than necessary). After all, people who use the 'auto switch project based on current file' plugin would want that behaviour. Maybe projects could be cached, but personally I don't think a big cache is needed. Even a cache of just the previous project would reduce disk reads quite a lot.
Also Geany has to read the disk quite regularly anyway (default every ~30s) to see if the current file has been modified outside Geany, so IMO disk access for a good reason is OK.
Regards, Nick