Don't keep serialized data in memory. Export it to a .json file, have individual ones for each chapter, get it on demand, provide a pseudo-array for chapters or something (keep authors in memory, they're small).
This was attempted in the add-model-upgrade branch but for some reason caused an infinite JSONifying loop? Fix merge conflicts and check it out, since it could improve things quite neatly.
(Actually seems like that branch had other issues such as being slower and not actually clearing stuff appropriately?)
(Actually seems like that branch had other issues such as being slower and not actually clearing stuff appropriately?)