! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add ThunarFileMonitor class to avoid connecting to many signal handlers to Th...
Status:
CLOSED: FIXED
Severity:
enhancement

Comments

Description Benedikt Meurer editbugs 2006-02-10 00:45:31 CET
Currently, both ThunarFolder and ThunarListModel have to connect a signal to
each and every file, and disconnect it later on. This can slow down things quite
a lot (makes up ~20% for the infos_ready to complete on a medium sized folder).

Instead, we could just a ThunarFileMonitor class, with changed(monitor,file) and
destroyed(monitor,file) signals.

thunar_file_destroy() (maybe dispose, check GObject source if dispose will also
be run on last unref!) and thunar_file_real_changed() would then check if a
monitor instance is present, and if so, forward the signal.
Comment 1 Benedikt Meurer editbugs 2006-02-12 16:33:53 CET
Committed with revision 19848.

2006-02-12	Benedikt Meurer <benny@xfce.org>

	* thunar/thunar-file-monitor.{c,h}, thunar/Makefile.am: Add new class
	  ThunarFileMonitor, which allows other objects stay informed about
	  changes to ThunarFile's without having to connect signal handlers to
	  every ThunarFile. Bug #1447.
	* thunar/thunar-file.c: Emit ThunarFileMonitor signals as appropriate.
	  Bug #1447.
	* thunar/thunar-folder.c, thunar/thunar-list-model.c: Use the newly
	  added ThunarFileMonitor to monitor files for changes and deletion
	  without having to connect and disconnect signal handlers to each and
	  every file. Bug #1447.

Bug #1447

Reported by:
Benedikt Meurer
Reported on: 2006-02-10
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.2.1svn

Attachments

Additional information