That wasn't really aimed at you specifically.
A problem like this can always be reduced to a smaller testcase. Normally that's for clarity, but in this case it'd also simply be for speed. Cutting out all but the first few Bible books should display the same behavior (including all of the potential performance issues) without taking 20 minutes for analysis.
If I hadn't done that already, it's something that could be worth investigating. But since I'd already done it, it's probably not worth repeating.