ChatGPT reduce react repaint duration

Reduces react repaint duration by limiting initial number of messages

Pada tanggal 09 Juni 2025. Lihat %(latest_version_link).

Penulis
SadSalmonTwT
Nilai
0 0 0
Versi
2025-06-09
Dibuat
09 Juni 2025
Diperbarui
09 Juni 2025
Size
4,3 KB
Lisensi
MIT
Berlaku untuk

Script for Tampermonkey.

On conversation load, ChatGPT will fetch the entire chat history and render it.
That takes forever if you have more than a few dozen messages.
The same issue occurs when you send a new prompt to the conversation, which causes the history to once again rerender (but this time it is not refetched).

This script intercepts the initial request for chat history and trims the response.
The history is a tree graph.
The variable INIT_NUMBER_OF_MESSAGES, which is 10 by default, defines the number of messages on the current branch that will be preserved.
If these messages have children of their own that are hidden (that typically happens on model change or response regeneration), then those are preserved as well.

Do note that if you keep the same conversation going on without ever refreshing the page or changing conversation in the side menu, you will run into the same issue with everything slowing down, since this script does not alter the app state, but just the init data.