Memory usage gradually climbs when navigating through a pdf. I'm not sure if this is a bug or a design feature (i.e. cache each page for fast rerendering), but it causes problems on smaller memory machines. With a long pdf consisting wholly of images, mupdf uses hundreds of MB of ram when navigating through the pages.
Patch below fixes the problem for me. diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 1393d4e..54827b8 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -274,6 +274,8 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage) /* Zero search hit position */ app->hit = -1; app->hitlen = 0; + + pdf_agestore(app->xref->store, 3); } if (drawpage)
Thanks. Patch applied.