# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1570021893 14400 # Node ID d3ee52820f6ba3a033dc0bf5cab67c8e1c197735 # Parent bfced396accaa84b13bd007d88b26a4211c7b430 Tile: don't update pixmap on tile change That's too eager and incurs slowness if we change all the tile palettes. Instead, just invalidate the current pixmap and let the lazy methods recreate it. diff --git a/nes.py b/nes.py --- a/nes.py +++ b/nes.py @@ -122,7 +122,7 @@ def set_palette(self, new_palette): self.palette = new_palette.copy() - self.update_pixmap() + self._pixmap = None def update_pixmap(self): img_data = bytes(sum(self.tile, []))