sioyek
sioyek copied to clipboard
High memory usage on macos.
problem
I just opened a 15-page pdf and kept it for an hour, and the memory usage went from 200MB to 1.2GB.
System information and installation method
- OS:
macOS 13.4 22F66 arm64
- Installation:
brew install --cask sioyek
Can you share the PDF here?
Can you share the PDF here?
I don't think this error is related to a specific pdf, because I tried different pdfs today, all between 10-50 pages, but the memory usage is up to 1.9G, and it grows with time.
for example, file with 15 pages (1.3MB):
Does it grow with time or with the number of pages scrolled? We cache a few pages so some memory increase with usage is expected, but if memory is increasing only with time (no scrolling), then there is a problem.
same here:
This amount is normal, does it increase with time to unreasonable values? (e.g. more than 4gb)
I wanted to report the same issue, Sioyek seems to use vast amounts of memory to open a PDF, sometimes more than 1GB. Apple's Preview uses a third of it. However its RSS is fairly small in comparison, about 56MB here. Here are the two programs with the same short PDF opened:
I suspect this may be caused by the lack of a native ARM64 build, the binary translation must add some overhead and resource usage. This may also explain why it's always using a couple percent CPU (and drain the battery) while Preview sits at 0%.
Sioyek can be built natively for Arm64 already with no change to source code. The problem is, since I don't have a mac machine, I rely on github actions to build the release binaries and they don't have arm mac machines yet.
Anyway, I doubt the problem is even the architecture. Because of very high resolution displays on mac machines the bitmap of a single page can take upwards of 100MB, and we cache a few pages, which can consume ~1GB of memory, which I consider reasonable. I could make the cache size configurable in future versions so we use less memory for cache.
I also met a high memory usage on windows. And maybe have scrolled too many pdfs, I got an "out of memory" error and then I rebooted machine. After that, I cannot make sioyek work any more, which means it just display a pure white board each time I open sioyek, and I cannot open the list of commands by pressing :
, and I cannot shift open another pdf or open any new pdf (only pure white board is displayed). How can I make sioyek work again? @ahrm
How can I make sioyek work again?
After I reinstalled the sioyek and found it still didn't work, I realized there is something wrong with my computer, so I rebooted again and the problems gone.
Good news, arm64 macOS GitHub Runners are at least in public beta:
https://github.blog/2023-10-02-introducing-the-new-apple-silicon-powered-m1-macos-larger-runner-for-github-actions/
Want to bring up the same issue. Has the cache sizing been fixed?
Hey, I'm havng a similar issue. The memory grows directly with me scrolling through a pdf on the app.
Specs: Macbook Pro M2 Pro macOS Sonoma 14.3 sioyek version 2.0.0, installed with brew.
~ » brew info sioyek
==> sioyek: 2.0.0
https://sioyek.info/
Installed
/opt/homebrew/Caskroom/sioyek/2.0.0 (221B)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/s/sioyek.rb
==> Name
Sioyek
==> Description
PDF viewer designed for reading research papers and technical books
==> Artifacts
sioyek.app (App)
/opt/homebrew/Caskroom/sioyek/2.0.0/sioyek.wrapper.sh -> sioyek (Binary)
==> Analytics
install: 150 (30 days), 495 (90 days), 2,129 (365 days)
Video shows me scrolling through a 21 page pdf, with no notes, links or bookmarks.
https://github.com/user-attachments/assets/cfef75a0-6e55-4e53-9de8-e75f8e09e3b8