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

Performance problem Content class #37

Open
francogrex opened this issue Aug 31, 2021 · 1 comment
Open

Performance problem Content class #37

francogrex opened this issue Aug 31, 2021 · 1 comment

Comments

@francogrex
Copy link

It becomes more and more sluggish as one moves along a book and on very large books it will crash because of that I think your proble lies in this code in the Content class, below:

	BookSection maintainBookSections(int index) throws ReadingException, OutOfPagesException {
		if (peakPage == index) { // Moving in order.
			peakPage++;
		} else {
			while (peakPage < index) { // Trying to move forward. Calculate the ones before first.
				getBookSection(peakPage++);
			}
		}
		return getBookSection(index);
	}
@mertakdut
Copy link
Owner

Hi. Can you provide heap dumps?

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

No branches or pull requests

2 participants