Git Product home page Git Product logo

Comments (2)

gen2brain avatar gen2brain commented on August 26, 2024

That doesn't mean necessarily that there is a memory leak. MuPDF tries hard to maintain stuff in memory as much as possible for performance reasons so any font or image is held in memory. mutool for example have the option to limit memory, also imagemagick when working with PDF can consume a LOT of memory, and recommends -limit memory.

I now added FZ_NO_CACHE for all devices, so it doesn't try to cache everything. You can test if there are any differences, I don't see anything obviously wrong currenty that needs to be closed/freed.

from go-fitz.

octacian avatar octacian commented on August 26, 2024

With your changes, RAM usage does not increase nearly as fast, but by the end of a 132 page PDF, it still managed to get up to 1.1 GiB. It does seem to have improved, and if there are any issues it sounds as though they would be in the upstream library. So this issue could probably be closed.

However, I do question why so much RAM usage is necessary at all. I don't know much about how PDFs work, but I'm pretty sure that browsing the internet requires rendering far more complex information than would be found in an average PDF file, and while browsers do tend to use a fairly substantial amount of RAM, I have yet to see one eat it up quite like this.

from go-fitz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.