Speeding up Comics rendering
I experimented with some hacks to make loading comics faster. Especially when loading from a remote share, the comics backend will effectively have to read all the archive data to render all the pages in the file as pixbufs to fetch the page size, and then do it another time to render the pages.
I've managed to make loading comics file instantaneous by caching the page size from the first page in the file. That obviously breaks quite badly when the pages aren't all the same size, but it shows speed could be achieved.
I think we could achieve a similar speed by extending ev_document_get_page_size()
to have an in/out parameter to say we need a "certain" page size or an approximation would do. The real page sizes can then be fetched when rendering the previews or the pages themselves the first time.
This could also be extended to other backends where the page size is expensive to compute.