I am using Scrivener for MacOS (ver. 3.1.5 ) on a 2019 iMac running Mojave (10.14.8 ). In the last few days Scrivener has manifested extreme memory use resulting in exhausted application space memory when sitting idle for an extended period with one or two rather lightweight projects open. For instance, this morning Scivener had pushed the memory activity monitor into the red (the machine has 16GB) with an 13.2MB file left open overnight. Closing the project freed the memory. By itself, Scrivener uses 79.6MB of system memory according to Activity Monitor. Restarting Scrivener and reopening the file, results in Scrivener’s memory use slowly climbing without my interacting in any way with the open file and with the app is running in the background on another “desktop”. It seems to continue to do this until memory is exhausted. I am not sure if it matters, but all files are stored in a Dropbox folder to enable sharing with an iPadOS version of Scrivener. I have not updated the files on the iPad in over a week (though this seems fairly irrelevant); and Dropbox is idle when the slow increase in memory use occurs. A memory leak of some sort?
Any advice you can provide would be deeply appreciated. Scrivener is one of my workhorse applications. Keep up the great work!
What’s in the project? Just text, or are there media or web files in the Research folder?
This isn’t a typical response. While I have noted a few types of activities can sometimes lead to notable memory leaking, they typically require large projects and those specific actions taken over the course of several days in order to be affected by them. By and large I often leave Scrivening running for weeks at a time, with several heavy-duty projects open for nearly that entire duration. While RAM usage can at times get high, I’ve never seen it become a problem.
There are a few things I would try:
- A simple reboot, if you haven’t in a while. Scrivener depends heavily upon a number of systems in the OS itself, and often if they are jammed up, so to will the software making use of them, be.
- If the problem returns, the next thing I would take a look at is content. Again to refer to these systems, the two that can be most problematic in my experience are Web Kit and PDF Kit. The former in particular would be highly suspect as a leak source, as all manner of nonsense can end up being loaded through that. WebArchive was designed to be an isolated archival format, but Web 2.0 broke that ideal ages ago. The average archived page draws directly from the Internet, and may be downloading ads which can be particularly problematic, especially if you have Flash installed. PDF is generally less of a problem, but it is another complex subsystem that can get overloaded with certain kinds of content.
If you suspect either of those may be an issue, try bulk exporting the resources out of the binder to a safe location, and then deleting them from Scrivener (emptying the trash as well of course). You may want to do an experiment like this on a copy of the project, via Save As, if you make heavy use of metadata and other organisational tools such as Bookmarks and Collections. The idea here is to look for a full cessation of the problem, and then gradually reincorporate resources until it breaks again. That’s a good way of finding a problematic website or PDF.
The project file in question generally does not contain anything more than text and links to library resources in a few documents. One document contains several images. So, all in all a nothing particular that should generate the behavior. I did reboot the system today (I rarely do, perhaps a sin of a long-time Linux user). You may be correct concerning some background library or process. I have the file open at the moment and the memory use increase noted earlier may no longer be an issue. I’ll let it run for a while to see what happens. Thanks for the suggestions. Cheers