I've been developing my AI service using Ai Studio for a month.
I've been having a lot of conversations with the AI, and I've noticed that even typing text for the conversation is incredibly slow.
My computer is a Macbook Pro m4 Pro, which is a decent enough computer.
Despite this, I'm at a loss as to how to resolve this incredibly slow performance.
The speed of your own computer barely matters. What does matter is the length of your prompts, though. And many users don’t realize this, but when you are chatting with the AI, it keeps sending the full chat history to the server.
So your first prompt might be fine lines and gets 100 lines in return. When you then post another five lines, you will actually send 5 + 100 + 5 or 110 lines to the server and will probably receive another 150 lines back. Your third post with five lines will then send 5 + 100 + 5 + 150 + 5 lines to the server, and this will just continue to grow.
It helps to clear the chat history once in a while. The amount of data being sent back and forth will slow things down. Especially if you are using Wi-Fi or a slow Internet connection.
The MacBook Pro m4 Pro is a pretty good system, as it’s from 2024. It should have twelve cores and 24 GB of RAM, plus a 512 GB SSD. Combined with the Wi-Fi 6E standard, that makes it a pretty decent system for this purpose. However, the slowness mostly comes from the network traffic and the load of the servers. When the prompts grow, the server is working a lot harder. And when the server sends back results, your browser also needs to work harder as it gets more data back after every prompt.
And the browser you use is also a bottleneck, as most browsers won’t use all the cores in your system. There’s a lot of JavaScript running in the browser to process all your prompt results, and it generally runs in a sandbox in your browser with limited resources. Your browser will likely use a single core for the tab that you have open for JavaScript, so that’s a known bottleneck. Chrome/Edge/Firefox do optimize things a bit by using more cores for some functionality, like the JIT compiler, but JavaScript is often running on a single core, even when you write asynchronous code. This is why a web page can even freeze while your computer seems to be running nicely.
Thx a lot katje ![]()
I will try earse some chat histroy
regard