Skip to content
Discussion options

You must be logged in to vote

If the approach you copied intercepts every single outgoing payload and incoming response, serializes them (e.g., parsing massive JSON objects), and writes them out, you are paying a huge CPU and I/O tax on every loop.
So The Fix for that is to Let the code run normally. Only capture, serialize, and log the data inside a catch / except block when a validation or payload error is actually thrown. And if you are printing the "last few messages and the current one" directly to your console, massive text dumps can actually freeze the execution thread. IDE terminals and standard consoles are notoriously slow at rendering huge blocks of text or JSON. try to write these debug logs directly to a …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jaytonic
Comment options

Comment options

You must be logged in to vote
1 reply
@jaytonic
Comment options

Answer selected by glennawatson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants