Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#589 non-responsive Geany while saving to a remote file ( gvfs )

open
nobody
General (289)
5
2010-11-24
2010-11-24
Anonymous
No

geany 0.19.1 (built on Sep 13 2010 with GTK 2.21.7, GLib 2.25.15)
Ubuntu 10.10 64bit

I've an issue with geany, when try to edit a remote file in a mounted FTP Host via gvfs,
it takes about 5 seconds to do the save operation,
while that time, Geany becomes non-responsive, then be responsive again after the save done, Any ideas ?

Discussion

  • Luke
    Luke
    2012-10-27

    I have also noticed this problem. Is saving done on the same thread?

     
  • Lex Trotman
    Lex Trotman
    2012-10-28

    Yes, saving is done on the main thread. Note that Geany has three ways to save a file:

    1. standard C library I/O, easily threaded, but no safety if something goes wrong, eg an FTP connection fails
    2. atomic file saving, that uses Glib, has safety features, but won't work on some remote filesystems that don't have rename capability, easily threadable *if* the implementation does not using g_main_loop
    3. GIO file saving, has safety features, will work on remote filesystems without rename, it has an asynchronous version that could minimise its impact on the GUI, but it also has a "feature" that deletes the existing file if something goes wrong with writing the new one.

    As you can see Geany developers have tried several ways to find the best file saving method. Each is suitable for different situations and none is perfect. Nobody has wanted to complicate the issue further by making asynchronous versions.

    A well written implementation that (optionally) made one or more of them asynchronous would probably be accepted. It would need to properly inform the main GUI loop of the completion status and display the results as is done now.