From kde-core-devel Mon Sep 13 02:57:18 2010 From: Michael Pyne Date: Mon, 13 Sep 2010 02:57:18 +0000 To: kde-core-devel Subject: Re: [PATCH] Cache returned KIconLoader pixmaps in 4.5.2 Message-Id: <20100913025721.3D07E88796 () postalmail-a6 ! g ! dreamhost ! com> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=128436242012611 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart2121252.rCe2cyleXn" --nextPart2121252.rCe2cyleXn Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Monday, September 13, 2010 00:20:40 Matthias Fuchs wrote: > Works really great now. I have a question though: > > When running my small test program the icon gets cached and then reused, > though if I run the test again -- i.e. start the program again -- it gets > also cached again and then reused, but shouldn't it still be in the cache > from running the program the first time? > Or does the cache gets cleaned up very fast? Define "cache". There are two: 1. A process-shared cache, but the catch is that the data must still be decoded from PNG (which is how both QImage and QPixmap stream it to storage). 2. A process-local pixmap cache. This essentially stores references to the QPixmap that had been read from cache 1 so that it is easy to refer to in the future. These pixmaps are already in either X server or GPU memory which is why they're much faster. Cache 1 was always working. All this does is utilize Cache 2 in addition in a more sane matter. But since Cache 2 is process-local, every time the application exits, you should expect items in it to go away. Regards, - Michael Pyne --nextPart2121252.rCe2cyleXn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABCAAGBQJMjZMOAAoJEAuvDJx7aunypCIP/3afWMqEkwofM79jnJdbKryL 05bFEJPhfsBIGPYW9Pe2PTaiwX9xIMzb4EMkOzgm26+6JIueabmxpJraFFEg5ZPh e2IVks0om9QflNQU687hDx83LHHUivpdzIn4fLO0vr5a7obvREgy8AqWiwaWzB2P kiyX+3kCdaYshEMCZPSgkNThVXtR2iaBifjC1RDZo25o+1oZgcJuYVfWVP7DPJ/n VX7wfdngE6+dKSzGA7cQH/MIYOmAdwa8s7AMRuxXupqyoSswn91GqyUwoyll/1Qb gZFt4zY/pYsh5z8tGjHlbqZvbKoQL3DgiqBFN1bYIyYyNmm5JrYytpMQneAUjCBT tshVnGYxBmnFtxSHYNBy1v3ExIdlt0Uoi739lzbPRyoDJdG2vr19SzlbCJV8R+l+ VNjNhUhA3V8BXPNBRZcI7L/K940FyBur0/asGaDYNaxBYYMbUeH2jjWG7s7QHFyX r76F2tmGl2artYHt36m2uIUE8OlF8HUlvfov0i7Ts1/2qsSiBrJe466OYdgRqjfi cX7EjTcrkd7A04yBeFtcMn50hR/xYvST7XqEtYCnNw86U6O9AVEzM/RMX0HMlb52 2P4ad3ZOMnWSlbSWrpFnVgfPKH6DphO70O36PCIroOfcxmCLV7kFHR+nNfC6aRjJ yD+El45xhMlCPsIrp4iq =ycwG -----END PGP SIGNATURE----- --nextPart2121252.rCe2cyleXn--