Skip to content

Improve handling of large request/response bodies #356

Description

@LucasPickering

Describe the bug
A clear and concise description of what the bug is

Currently it's difficult to work with large recipe/request/response bodies. There's a lot of small issues here that lead to the performance being really bad:

  • Request bodies are logged to the log file
  • Syntax highlighting happens sychronously. If it takes a while, the main thread blocks
  • Large request bodies are written to the DB, which is slow and will make the DB file huge
    • Past a certain size, we should just omit the body
  • Bodies should be streamable if coming from a file (only helps for requests, not responses) Stream large HTTP bodies #256
  • Loading a large body in a template preview never renders
  • App crashes when trying to send a large body
  • Large response bodies should be periodically cleaned up from the DB
    • We still need to store responses for chains and display in the UI, but maybe don't store more than 1 or 2 instance of large bodies?
  • Large body causes UI lag when loading that recipe Lag spike when opening recipe with large response in history #530

To Reproduce
Steps to reproduce the behavior

Loading a request with this file should make the issues pretty apparently. Here's a 5MB file

Expected behavior
A clear and concise description of what you expected to happen

The app should experience little to no slow down when working with large bodies. We may have to take shortcuts (e.g. skipping syntax highlighting), but it should be usable.

Screenshots
If applicable, add screenshots to help explain your problem

Version (please complete the following information):

  • OS:
  • Terminal:
  • Slumber Version:

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions