loadTestDataFromDb: Load data in chunks of 100 rows #90
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the new data from our first traffic collection on the web (tweaselORG/data.tweasel.org#3), the request database has gotten quite huge and I have seen debug-adapter runs take a long time and even fail due to timeouts.
Luckily, the timeouts at least can be solved quite easily. Turns out, we were already trying to load all matching rows in a single request. Now, we instead load it in chunks of 100 rows. Setting the _size parameter was sufficient for that—we had already implemented handling of the next_url in responses and row limits.
With this change, I haven't seen any timeouts anymore so far and while still slower, it isn't too bad anymore.
I still want to work on making data.tweasel.org as a whole faster again, but this is a good change in any case.