summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-file.h
diff options
context:
space:
mode:
authorJohn Sullivan <sullivan@src.gnome.org>2001-01-24 01:49:33 +0000
committerJohn Sullivan <sullivan@src.gnome.org>2001-01-24 01:49:33 +0000
commitaeb4b32c17e7c06c6a39c45f7db47cbcaea6debb (patch)
tree7ada17abead4688fbcad709e7f005dc3313974c7 /libnautilus-private/nautilus-file.h
parentc562c9ca9ff682836ee99d29bb32d1e0b9b15bb4 (diff)
downloadnautilus-aeb4b32c17e7c06c6a39c45f7db47cbcaea6debb.tar.gz
Fixed bug 2153 (deep count calculation in properties window
could be faster) Fixed bug 5687 (Sidebar flickers and CPU thrashes during deep count calculation in properties window) Changed the deep count calculation to send a specialized signal when the in-progress count updates, instead of using "file_changed", since many parts of the UI react to file_changed by doing (in this case unnecessary) work. My stopwatch measurement on a large directory showed that the time to calculate 20000 contained files went from 147 seconds to 8 seconds, and the CPU usage pegged around 15% (formerly 100%). * libnautilus-extensions/nautilus-directory-async.c: (deep_count_callback): Call nautilus_file_changed only when count is finished; call nautilus_file_updated_deep_count_in_progress after every new higher value is computed. * libnautilus-extensions/nautilus-file-private.h: Added prototype for nautilus_file_updated_deep_count_in_progress. * libnautilus-extensions/nautilus-file.h: * libnautilus-extensions/nautilus-file.c: (nautilus_file_initialize_class): define "updated_deep_count_in_progres" signal. (nautilus_file_updated_deep_count_in_progress): send this new signal for this file (which must be a directory) and any links pointing to it. * src/file-manager/fm-properties-window.c: (attach_directory_contents_value_field): Make text field in properties window react to new signal instead of "changed".
Diffstat (limited to 'libnautilus-private/nautilus-file.h')
-rw-r--r--libnautilus-private/nautilus-file.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file.h b/libnautilus-private/nautilus-file.h
index 707f27951..2f29a9056 100644
--- a/libnautilus-private/nautilus-file.h
+++ b/libnautilus-private/nautilus-file.h
@@ -304,6 +304,9 @@ typedef struct {
/* Called when the file notices any change. */
void (* changed) (NautilusFile *file);
+ /* Called periodically while directory deep count is being computed. */
+ void (* updated_deep_count_in_progress) (NautilusFile *file);
+
/* Virtual functions (mainly used for trash directory). */
void (* monitor_add) (NautilusFile *file,
gconstpointer client,