chatGPTBox icon indicating copy to clipboard operation
chatGPTBox copied to clipboard

Extremely slow, and resource(CPU) usage high on Firefox when the prompt is large

Open PeterDaveHello opened this issue 1 year ago • 6 comments

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

PeterDaveHello avatar Apr 23 '23 15:04 PeterDaveHello

Is there an article url that can reproduce this issue?

josStorer avatar Apr 23 '23 15:04 josStorer

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.

PeterDaveHello avatar Apr 23 '23 16:04 PeterDaveHello

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.

josStorer avatar Apr 24 '23 03:04 josStorer

Looks very helpful 🎉

PeterDaveHello avatar Apr 26 '23 15:04 PeterDaveHello

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 😓

PeterDaveHello avatar Jul 23 '23 07:07 PeterDaveHello

fixed in https://github.com/josStorer/chatGPTBox/commit/d36f6ea245ab8f72d72d12199e3d49ca12fb9f2e

josStorer avatar Nov 02 '23 13:11 josStorer