Speed-up



The new mime-sniffing causes files to be added to the pending list of
directory views faster, but since the file are _appended_ to the list,
the algorithm is now quadratic because the next batch of files will be
ready before the existing ones have been processed.

This patch gives a good speed-up, especially on big directories.

Søren

Index: fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.601
diff -u -r1.601 fm-directory-view.c
--- fm-directory-view.c	14 Jan 2004 16:19:18 -0000	1.601
+++ fm-directory-view.c	15 Jan 2004 20:55:19 -0000
@@ -2608,8 +2608,8 @@
 		return;
 	}
 
-	*pending_list = g_list_concat (*pending_list,
-				       nautilus_file_list_copy (files));
+	*pending_list = g_list_concat (nautilus_file_list_copy (files),
+				       *pending_list);
 
 	if (! view->details->loading || nautilus_directory_are_all_files_seen (view->details->model)) {
 		schedule_idle_display_of_pending_files (view);


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