Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kepubify runs out of memory on gigantic ebooks #35

Closed
pgaskin opened this issue Feb 9, 2019 · 2 comments
Closed

Kepubify runs out of memory on gigantic ebooks #35

pgaskin opened this issue Feb 9, 2019 · 2 comments
Assignees
Labels

Comments

@pgaskin
Copy link
Owner

pgaskin commented Feb 9, 2019

I received a PM on MobileRead about a book (William Shakespeare Complete Works published by Modern Library) which was way bigger than anything I've seen before and causes kepubify to run out of memory during conversion.

@pgaskin pgaskin added the bug label Feb 9, 2019
@pgaskin pgaskin self-assigned this Feb 9, 2019
@pgaskin
Copy link
Owner Author

pgaskin commented Feb 9, 2019

This is only reproducible for me on devices with less than 4GB of available memory. Based on pprof, the memory issue seems to be due to regexps and something to do with the span adding.

This also may be due to the number of goroutines.

@pgaskin
Copy link
Owner Author

pgaskin commented Jan 13, 2020

The refactor I'm working on right now should fix this issue and greatly improve performance. One of the biggest changes in this area is optimizing the span adding by decreasing the number of memory allocations, streamlining the logic, and using a stack-based algorithm rather than recursion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant