johnfactotum / foliate

Read e-books in style
https://johnfactotum.github.io/foliate/
GNU General Public License v3.0
6.37k stars 292 forks source link

Foliate freezes while opening EPUBs #1014

Closed Nanda-G closed 1 year ago

Nanda-G commented 1 year ago

Describe the bug Once an EPUB file is opened, Foliate freezes while navigating around with the arrow keys. Clicking with the mouse unfreezes Foliate for a moment and moves past the pages depending on the number of times you pressed the arrow key. Eventually, Foliate stops responding to even mouse clicks and freezes completely and doesn't let you navigate the pages.

To Reproduce Steps to reproduce the behavior:

  1. Launch Foliate
  2. Open an EPUB file
  3. Navigate around the pages

Expected behavior Expected behavior is that the EPUB file opens and its possible to read it without any hiccups

Screenshots Here's a video of me launching an EPUB and navigating around it - you can clearly notice Foliate freezing unless I keep clicking on the screen.

Here's a graph of the CPU and memory usage of the process including its children, plotted with the command psrecord $(pgrep "gjs.*") --interval 1 --plot foliate-usage.png --include-children

Version:

Additional context There are also some other problems. Once I open a book for the first time and quit Foliate and launch Foliate again, it doesn't load the book at all and the cog is spinning till forever. If I remove the book from the library and then open it again, the book loads just fine but the freezing and lagging is still there.

EPUB file size: 255.4 KB

Tuba2 commented 1 year ago

Was your PC in Power Saving mode?

Nanda-G commented 1 year ago

Oh my god, it was. It didn't occur to me at all to check that. Thank you!

Tuba2 commented 1 year ago

No problem, been there too! Hope someone can help with that issue soon enough.