Kong / Kong/insomnia

Collapse-all json keybind in response preview stalls program on very large json response

Open
#7,825 1 comment 0 reactions 0 assignees View on GitHub
B-bug S-unverified
Dominant language
TypeScript
Stars
40k
Forks
2.4k
Avg merge
2d 13h
Merged PRs (30d)
61

Description

### Expected Behavior

I expected to see the collapsed json after a bit of time waiting, as the response is very large (200,000 lines).

### Actual Behavior

The program stalls and is unresponsive even 5 mins after trying the keybind to collapse-all.

### Reproduction Steps

The endpoint I hit is privileged, but any uri that returns a response of type application/json that is ~200,000 lines long and contains many different objects and lists should produce the same result.

1. GET /uri/that/produces/large/json
2. In Preview, select Visual Preview or Source Code
3. Press keybind for collapse-all ( Ctrl+Shft+- ; Cmd+Shft+- )

### Is there an existing issue for this?

- [X] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.

### Additional Information

This alert message shows up almost immediately.
Screenshot 2024-08-09 at 10 57 48 AM
Clicking Reload does not change the stalled state of the program and another alert usually appears soon after.
Clicking Cancel and then closing and reopening the program returns it to normal.

### Insomnia Version

9.3.3

### What operating system are you using?

macOS

### Operating System Version

macOS Sonoma Version 14.6

### Installation method

Downloaded from insomnia.rest

### Last Known Working Insomnia version

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the stall in Preview using a roughly 200,000-line application/json response, then test Visual Preview and Source Code with the collapse-all keybind. Done means collapse-all completes without leaving the macOS application unresponsive, and Reload or Cancel does not need to recover it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.