Load request payloads lazily - #66
Open
ipo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The /requests page was a real performance hog, constantly eager-reloading 200 requests at a time, which caused significant strain over time. I had 5.6-sol rewrite it to be lazy-loading instead, it should be a minimal-impact improvement if you merge it.
Performance Numbers
The /requests page refreshes every 10 seconds and displays up to 200 rows. Previously, each refresh loaded all stored request and response bodies, although the table only needs metadata.
For 0.8 MiB payloads (my average), this could transfer 152 MiB of unnecessary data per refresh—15 MiB/s or 53 GiB/hour while the page remained open. The new implementation loads only metadata and fetches a payload when the user opens or copies that request. It also removes redundant full-payload transfers between the worker, server, and connected dashboards.