gutenbergtools / autocat3

CherryPy App that serves dynamic content for Project Gutenberg
GNU General Public License v3.0
4 stars 6 forks source link

fix "last" button? #61

Closed eshellman closed 3 years ago

eshellman commented 4 years ago

this change turned off paging in result sets returned from the database, even though results continued to be paged.

eshellman commented 4 years ago

so this is still not right.

eshellman commented 4 years ago

OK, what the "MAX_RESULTS" parameter (1000) has been doing is it doesn't let you go past 50 pages of results if you set 20 results per page. Because the DB has to count out 1000 result to get to the 21st page. For searches with many results, the database was sending back ALL the results instead of the first 20 results - possibly 3000x the size. And these results get saved in memory, blowing up the server. So we can use this branch to experiment with the last button, but I think, based on our results, that it should wait till we have a robust test environment reflective of the production config.