-
|
I'm learning the source code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
When we parse the response to show it visually as formatted JSON we are converting it to a bunch of html elements. 1.5mb of text turns into about 8mb of html. Beyond this size the app was often crashing/freezing as parsing was so slow. The limit was set to avoid this. I have offloaded large file payloads to a worker, but even still there were performance issues when rendering that markup on the main thread. https://github.com/warrenday/graphql-network-inspector/blob/master/src/hooks/useHighlight/index.ts Possible solutions would be incremental rendering with virtual scrolling. So only render what is on screen. |
Beta Was this translation helpful? Give feedback.
When we parse the response to show it visually as formatted JSON we are converting it to a bunch of html elements. 1.5mb of text turns into about 8mb of html. Beyond this size the app was often crashing/freezing as parsing was so slow. The limit was set to avoid this.
I have offloaded large file payloads to a worker, but even still there were performance issues when rendering that markup on the main thread.
https://github.com/warrenday/graphql-network-inspector/blob/master/src/hooks/useHighlight/index.ts
Possible solutions would be incremental rendering with virtual scrolling. So only render what is on screen.