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);
}
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: