Hi there,
I'd like to see threaded file handling (read, write, ...) in Geany because I'm mostly working directly on servers and waiting for one of that dozens of files to save (or open) becomes a torture quite fast.
Instead of waiting for one file to get saved I could work on another file which logically speaking saves time.
Regards, Jonas
On Mon, 27 Jul 2009 11:21:41 +0200, Jonas wrote:
Hi there,
I'd like to see threaded file handling (read, write, ...) in Geany because I'm mostly working directly on servers and waiting for one of that dozens of files to save (or open) becomes a torture quite fast.
Instead of waiting for one file to get saved I could work on another file which logically speaking saves time.
Some time ago, I worked on this and if I didn't post the patch somewhere on the net (mailing list, bug tracker, I don't remember) I probably have it laying around on my hard disk somewhere.
The main problem with threaded or asynchronous file operations is that you don't have any feedback of the result of the requested operation. That is, for file opening is almost completely useless because at the very first we need the contents of the file to continue opening it, obviously. So, when the user chooses to open a file from a remote server which may take a few seconds, with asynchronous read nothing would happen in Geany. The file open dialog would be closed and Geany would wait for the server to respond while the user just don't see anything and thinks something went wrong. Then, a few seconds later the server finally responds and Geany starts opening the document while the user is doing something else and is even more confused what's happening. Sorry, I don't see how this could be an improvement.
Regarding file saving: this is more or less easier to realise and also more useful but also for plain file saving, i.e. when the user clicks the Save button or hit Ctrl-S. But we do most save operations implicitly in Geany e.g. when compiling/building/running the current file. At this point we need synchronous saving otherwise the whole point in saving a file prior to an operation which relies on it becomes useless.
Regards, Enrico
Am 27.07.2009 13:59, schrieb Enrico Tröger:
Sorry, I don't see how this could be an improvement.
Well just open some new tab and set its label to "Loading foo.ext..." and you're done ;-)
[...]e.g. when compiling/building/running the current file. At this point we need synchronous saving otherwise the whole point in saving a file prior to an operation which relies on it becomes useless.
Yes, but that's the only case in that you need synchronous saving.
Regards, Jonas
On Mon, 27 Jul 2009 14:34:36 +0200, Jonas wrote:
Am 27.07.2009 13:59, schrieb Enrico Tröger:
Sorry, I don't see how this could be an improvement.
Well just open some new tab and set its label to "Loading foo.ext..." and you're done ;-)
Hmm ok. Not sure I would like this but it could be at least a start of a solution for the mentioned problems.
[...]e.g. when compiling/building/running the current file. At this point we need synchronous saving otherwise the whole point in saving a file prior to an operation which relies on it becomes useless.
Yes, but that's the only case in that you need synchronous saving.
There was another case as well but I can't remember it right now, unfortunately. Anyway, attached is the patch I mentioned. It's a few months old so it probably won't apply cleanly anymore against trunk but it should be easily possible to manually replay the changes. Note that the patch is in an early alpha state, I only tested it shortly and there might be still tons of problems. But if anyone wants to work on this, feel free to do it. I can't spend any time on this in the next few weeks, sorry.
Regards, Enrico