View Single Post
Old 08-12-2026, 12:24 PM   #85
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 9,934
Karma: 7500000
Join Date: Nov 2009
Device: many
I have similar thoughts but to be fair, a limit on cache size can be set. So its memory foot print should be controllable.

You can check out his code implementation here:

https://github.com/rinne1998/Sigil/c...75743429e7ac88

Sigil ImageResources already know how to describe themselves so we could simplify that code a bit.

Also we could change the BookView header to use its own BookTreeView pointer to remove the need to static cast anything.

We could also remove the use of auto in places since the actual classes/types are all known and actual typing is always preferred.

An alternative is that all ImageResources could build their own thumbnails on the fly if we wanted that but his cache approach should be faster and take up less memory than each resource building its own QImage thumbnail image on the fly and then remembering them.

Anyway, some things to consider.

Last edited by KevinH; 08-12-2026 at 01:57 PM.
KevinH is offline   Reply With Quote