ChatGPT reduce react repaint duration

Reduces react repaint duration by limiting initial number of messages

当前为 2025-06-09 提交的版本,查看 最新版本

作者
SadSalmonTwT
评分
0 0 0
版本
2025-06-09
创建于
2025-06-09
更新于
2025-06-09
大小
4.3 KB
许可证
MIT
适用于

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.

长期地址
遇到问题?请前往 GitHub 提 Issues。