[nautilus] window-slot: stop the current view loading in location change



commit 33f152e6bb880909cb2a663d9827f926d8943163
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Jul 23 18:28:33 2015 +0200

    window-slot: stop the current view loading in location change
    
    So the current view don't keep polling files info while we try
    to actually change the location.
    
    This was causing nautilus to be slow like hell on some situations,
    since the new location waits until it has it's files info ready
    to actually change the view, but the old view was also polling files info.
    Given that the priority of both actions are the same, even if they are
    in different threads, one of those could cope the other one.
    
    So just avoid this situation (although there is similar issues like this
    with the current code...).

 src/nautilus-window-slot.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index 860f6ef..c8d4b62 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -930,6 +930,9 @@ begin_location_change (NautilusWindowSlot *slot,
 
         /* Avoid to update status from the current view in our async calls */
         nautilus_window_slot_disconnect_content_view (slot);
+        /* We are going to change the location, so make sure we stop any loading
+         * or searching of the previous view, so we avoid to be slow */
+        nautilus_view_stop_loading (slot->details->content_view);
 
        /* If there is no new selection and the new location is
         * a (grand)parent of the old location then we automatically


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