chatGPTBox
chatGPTBox copied to clipboard
Extremely slow, and resource(CPU) usage high on Firefox when the prompt is large
Describe the bug
Provide a large prompt like an article, the CPU usage of the Firefox browser will be 100%, the whole UI response will be very slow, even though the response is not that large(like limited to 1000 token)
Expected behavior
Normal response speed and CPU usage?
Environment
- OS: Ubuntu 22.04
- Browser: Firefox 112.0.1 (64-bit)
- Extension Version: v2.2.8
- No other browser extension installed, only chatGPTBox
Is there an article url that can reproduce this issue?
https://www.theguardian.com/science/2021/jul/05/sixty-years-of-climate-change-warnings-the-signs-that-were-missed-and-ignored
Tested with whole webpage selected via Ctrl + A, ask gpt-4-32k model to translate it, if paste one time is not slow enough for a faster environment, maybe paste it twice will help.
Try folding the conversation before asking, ensuring that all content before each question is in a collapsed state. Will this improve the situation? The problem may be that I haven't optimized the rendering for React, so it is rendering all content in full each time.
Looks very helpful 🎉
I'm not 100% sure but it seems folded conversation also causing #462, so the situation becomes a limit for long content, even if I'm okay with the CPU usage, sometimes the tab will just crash 😓
fixed in https://github.com/josStorer/chatGPTBox/commit/d36f6ea245ab8f72d72d12199e3d49ca12fb9f2e