Skip to content

Draft: Optimize file selection performance by replacing GList with GHashTable (#1371)

Replace the GList-based selected_files container with a GHashTable to improve performance when handling large file selections. This addresses performance bottlenecks described in issue #1371.

Key changes:

  • Convert selected_files from GList* to GHashTable* in ThunarStandardViewPrivate
  • Use g_hash_table_new_full() for initialization with proper cleanup
  • Replace all list iteration with hash table iteration using GHashTableIter
  • Optimize drag-and-drop by building file lists directly from hash table
  • Update statusbar logic to use O(1) size checks instead of g_list_length()
  • Improve selection transfer between views using hash table operations

Merge request reports

Loading