Comments (2)
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.
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)
- getting crash for some pdf format HOT 1
- start program HOT 2
- undefined: fitz.New HOT 3
- fitz is not importing correctly HOT 2
- centos alpine build faild HOT 5
- Linux platform, when PDF is invalid
- Error when convert PDF to Image HOT 3
- Out of Memory issues with frequent requests HOT 6
- build for linux HOT 2
- Creating new PDF file with loaded pages HOT 1
- how to build mupdf static library in window platform HOT 10
- cannot find builtin CJK font HOT 1
- doc.HTML() can it support <table> <tr> <td>? HOT 1
- linux compilation error HOT 3
- linux ubuntu build fail HOT 5
- Makes discord/lilliput segfault HOT 2
- fitz is empty HOT 2
- How to build docker with this package?
- GCC 12.2 Support HOT 10
- Is it possible to add PDF splitting and merging functions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-fitz.