Fix store lag: decode cached covers off the GUI thread
This commit is contained in:
+4
-4
@@ -2231,10 +2231,10 @@ class StorePage(QWidget):
|
|||||||
rid, system = lc
|
rid, system = lc
|
||||||
else:
|
else:
|
||||||
rid, system = covers.stable_key(it["name"]), it.get("system") or "games"
|
rid, system = covers.stable_key(it["name"]), it.get("system") or "games"
|
||||||
p = covers.cover_path(rid, system)
|
# Covers are decoded + scaled off the GUI thread (StoreCoverLoader).
|
||||||
if p.exists() and covers.file_is_image(p):
|
# Never load a QPixmap here — doing so for cached covers made the store
|
||||||
item.setIcon(QIcon(_fit_pixmap(QPixmap(str(p)), self.ICON_W, self.ICON_H)))
|
# unresponsive while filling/scrolling.
|
||||||
elif system not in ("theme", "dlc") and rid not in self._cover_attempted:
|
if system not in ("theme", "dlc") and rid not in self._cover_attempted:
|
||||||
# Themes and DLC have no meaningful box art in libretro/IGDB, and
|
# Themes and DLC have no meaningful box art in libretro/IGDB, and
|
||||||
# bulk-scraping hundreds of them on every switch to the DLC list
|
# bulk-scraping hundreds of them on every switch to the DLC list
|
||||||
# saturates the network/CPU and makes the store unresponsive.
|
# saturates the network/CPU and makes the store unresponsive.
|
||||||
|
|||||||
Reference in New Issue
Block a user