[gnome-music/wip/mschraal/file-exists-async: 5/9] Rework I/O priorities slightly




commit 2610bd80666bcdc8d32714c5881e6b0d14d12a24
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun Aug 15 22:50:47 2021 +0200

    Rework I/O priorities slightly
    
    * Make the albumsview on demand cover loading priority a higher as it is
    the main view.
    * Bring FileExistsAsync in line with the other priorities.

 gnomemusic/fileexistsasync.py  | 2 +-
 gnomemusic/views/albumsview.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/fileexistsasync.py b/gnomemusic/fileexistsasync.py
index c97a521fa..408abc009 100644
--- a/gnomemusic/fileexistsasync.py
+++ b/gnomemusic/fileexistsasync.py
@@ -47,7 +47,7 @@ class FileExistsAsync(GObject.GObject):
         """
         thumb_file.query_info_async(
             Gio.FILE_ATTRIBUTE_STANDARD_TYPE, Gio.FileQueryInfoFlags.NONE,
-            GLib.PRIORITY_HIGH_IDLE, None, self._on_query_info_finished)
+            GLib.PRIORITY_LOW, None, self._on_query_info_finished)
 
     def _on_query_info_finished(
             self, thumb_file: Gio.File, res: Gio.AsyncResult) -> None:
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index 38806f57f..05c7f49a5 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -106,7 +106,7 @@ class AlbumsView(Gtk.Stack):
 
         self._adjustment_timeout_id = GLib.timeout_add(
             200, self._retrieve_covers, adjustment.props.value,
-            priority=GLib.PRIORITY_LOW)
+            priority=GLib.PRIORITY_DEFAULT - 10)
 
     def _retrieve_covers(self, old_adjustment):
         adjustment = self._scrolled_window.props.vadjustment.props.value


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