After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349241 - Make file_in_trash invocation async.
Make file_in_trash invocation async.
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
2.15.x
Other All
: Normal normal
: ---
Assigned To: Christian Neumair
Nautilus Maintainers
: 343941 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-30 04:38 UTC by Aaron Gyes
Modified: 2006-08-08 08:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.16 KB, patch)
2006-07-30 09:37 UTC, Christian Neumair
none Details | Review

Description Aaron Gyes 2006-07-30 04:38:44 UTC
Browsing an sftp "share" in nautilus is rediculously slow. I am confident the issue is in nautilus and not with gnome-vfs, it's lightening fast in filechoosrs and similar.

The entire UI will "lock up" for ten to fifteen seconds each time I change into another directory, and then stay that way for a while after the icons get painted.

Here's a backtrace done when it's locked up:

Program received signal SIGINT, Interrupt.
[Switching to Thread -1226094928 (LWP 26909)]
0xffffe410 in __kernel_vsyscall ()
(gdb) thread apply all bt


Comment 1 Aaron Gyes 2006-07-30 04:45:33 UTC
Just to mix things up here is another backtrace from a few seconds later, still feels locked up.

(gdb) thread apply all bt

Thread 1 (Thread -1226094928 (LWP 26909))

  • #0 __kernel_vsyscall
  • #1 __read_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 atomic_io
    at sftp-method.c line 204
  • #3 buffer_recv
    at sftp-method.c line 357
  • #4 iobuf_read_file_info
    at sftp-method.c line 743
  • #5 get_file_info_for_path
    at sftp-method.c line 2486
  • #6 do_get_file_info
    at sftp-method.c line 2617
  • #7 gnome_vfs_get_file_info_uri_cancellable
    at gnome-vfs-cancellable-ops.c line 201
  • #8 gnome_vfs_get_file_info_uri
    at gnome-vfs-ops.c line 332
  • #9 _gnome_vfs_uri_resolve_all_symlinks_uri
    at gnome-vfs-utils.c line 1972
  • #10 gnome_vfs_find_directory_cancellable
  • #11 gnome_vfs_find_directory
    at gnome-vfs-find-directory.c line 63
  • #12 eel_uri_is_in_trash
    from /usr/lib/libeel-2.so.2
  • #13 nautilus_file_is_in_trash
    at nautilus-file.c line 5211
  • #14 viewed_file_changed_callback
    at nautilus-window-manage-views.c line 311
  • #15 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_chain_from_overridden
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #20 nautilus_file_emit_changed
    at nautilus-file.c line 5437
  • #21 nautilus_directory_emit_change_signals
    at nautilus-directory.c line 762
  • #22 nautilus_file_changed
    at nautilus-file.c line 5383
  • #23 dequeue_pending_idle_callback
    at nautilus-directory-async.c line 915
  • #24 directory_load_callback
    at nautilus-directory-async.c line 1028
  • #25 dispatch_job_callback
    at gnome-vfs-job.c line 237
  • #26 g_source_is_destroyed
    from /usr/lib/libglib-2.0.so.0
  • #27 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #28 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #29 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #30 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #31 main
    at nautilus-main.c line 367
  • #32 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #33 _start

Comment 2 Aaron Gyes 2006-07-30 04:46:32 UTC
Guess it's the same except the other thread was done.

[Thread -1292895328 (LWP 26975) exited]
Comment 3 Christian Neumair 2006-07-30 09:30:08 UTC
It's probably gnome_vfs_find_directory/eel_uri_is_in_trash which can be quite expensive. Maybe we should cache it's value and add it to the NautilusFileAttributes. An async and cancellable version of eel_uri_is_in_trash would be required for this, which also allows us to make the UI non-blocking.


For the time being, we can filter out methods that don't support find_directory right in GnomeVFS and save time.


However: Thanks, good catch!
Comment 4 Christian Neumair 2006-07-30 09:37:45 UTC
Created attachment 69902 [details] [review]
Proposed patch

The attached patch against GnomeVFS should fix your issue. It was also submitted to gnome-vfs-list for review.
Comment 5 Aaron Gyes 2006-07-30 21:16:11 UTC
Wonderful, thanks!

The patck works great and I can finally get some work done using Nautilus :)
Comment 6 Sebastien Bacher 2006-08-04 21:50:33 UTC
*** Bug 343941 has been marked as a duplicate of this bug. ***
Comment 7 Alexander Larsson 2006-08-08 08:55:52 UTC
Commited.