Re: [Nautilus-list] [PATCH]: avoid re-layouting when it's not needed.



On 17Jun2001 12:58PM (+0200), Yoann Vandoorselaere wrote:
> 
> On directory load, we do relayout several time before it's needed
> (before any file get added or changed). In fact, in this case, the
> files_changed signal should only be hooked after finish_loading is
> called (when the view is loaded and we are starting monitoring the
> directory), and disconnected as soon as the directory load is done.
> 
> This work fine on my local tree, and seem to help with latency.
> 

Darin said he was worried about this change introducing bugs. Can you
describe what testing you did to make sure it doesn't, and also what
testing you did to show that this change really improves performance?

Regards,

Maciej


> BTW : in the finish_loading function, 
>       schedule_timeout_display_of_pending_files() get called, but
>       it doesn't seem to be needed, as it will get called implicitly
>       by the nautilus_directory_file_monitor_add() call and the
>       "files_changed" it trigger. 
> 
>       Do I miss the point here or is it ok to remove it ?
> 
> 
> Can I commit ?
> 
> 
> Index: src/file-manager/fm-directory-view.c
> ===================================================================
> RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
> retrieving revision 1.459
> diff -u -p -r1.459 fm-directory-view.c
> --- src/file-manager/fm-directory-view.c	2001/05/19 11:56:42	1.459
> +++ src/file-manager/fm-directory-view.c	2001/06/17 10:35:10
> @@ -2068,13 +2068,18 @@ update_menus_timeout_callback (gpointer 
>  static gboolean
>  display_pending_idle_callback (gpointer data)
>  {
> +	gboolean ret;
>  	FMDirectoryView *view;
>  		
>  	view = FM_DIRECTORY_VIEW (data);
> -
>  	view->details->display_pending_idle_id = 0;
>  
> -	return ! display_pending_files (view);
> +	ret = display_pending_files (view);
> +	if ( ret ) {
> +		disconnect_model_handlers (view);
> +	}
> +	
> +	return ! ret;
>  }
>  
>  static gboolean
> @@ -4650,8 +4655,6 @@ load_directory (FMDirectoryView *view,
>  	 * of old selection.
>  	 */
>  	schedule_update_menus (view);
> -
> -	disconnect_model_handlers (view);
>  
>  	old_directory = view->details->model;
>  	nautilus_directory_ref (directory);
> 
> 
> 
> -- 
> Yoann Vandoorselaere | Tiniest "mesures unities?"
> MandrakeSoft         | - lenght : millimeter
>                      | - volume : milliliter
>                      | - intelligence : military man
> 
> _______________________________________________
> Nautilus-list mailing list
> Nautilus-list lists eazel com
> http://lists.eazel.com/mailman/listinfo/nautilus-list




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