Limiting thread spawns
This commit is contained in:
@@ -31,14 +31,18 @@ class GridMixin:
|
||||
for file in files:
|
||||
store.append([None, file[0]])
|
||||
|
||||
for i, file in enumerate(files):
|
||||
self.create_icon(i, tab, store, dir, file[0])
|
||||
self.load_icons(tab, store, dir, files)
|
||||
|
||||
# NOTE: Not likely called often from here but it could be useful
|
||||
if save_state and not trace_debug:
|
||||
self.fm_controller.save_state()
|
||||
|
||||
|
||||
@threaded
|
||||
def load_icons(self, tab, store, dir, files):
|
||||
for i, file in enumerate(files):
|
||||
self.create_icon(i, tab, store, dir, file[0])
|
||||
|
||||
def create_icon(self, i, tab, store, dir, file):
|
||||
icon = tab.create_icon(dir, file)
|
||||
GLib.idle_add(self.update_store, *(i, store, icon, tab, dir, file,))
|
||||
|
Reference in New Issue
Block a user