Local Ai
The page opened in 1.1s, but my local agent spent 53.5s reading it
https://preview.redd.it/2fvmzd4f3ish1.png?width=952&format=png&auto=webp&s=d21e33fd26b46d2268a12219d8c0619666eb000e I thought something was off because browser_search was taking almost a minute for a
https://preview.redd.it/2fvmzd4f3ish1.png?width=952&format=png&auto=webp&s=d21e33fd26b46d2268a12219d8c0619666eb000e I thought something was off because browser_search was taking almost a minute for a single run on my local agent. At first I blamed the search engine or the network, but when I actually timed it, the page itself was opening in about 1.1 seconds. The slow part was what happened after that. The agent was checking each element one by one: whether it was visible, reading several attributes, checking if it was disabled, and going back and forth with the browser for each of those checks. The page I tested had 494 elements across 5 frames. Those tiny calls added up to thousands of browser round trips, and a single snapshot ended up taking 53.5 seconds. I changed it so each frame gets read in one pass instead of checking every element separately. With the same query: browser_snapshot: 53.5s → 0.5s browser_search: 41.3 / 53.9 / 36.3s → 3.4 / 1.2 / 1.5s https://preview.redd.it/pfoqp5vf5ish1.png?width=539&format=png&auto=webp&s=a977e4124e2a74f148b983286c5e03464212df72 The same 12 search results still came back. So the model wasn't the bottleneck, and neither was the search engine. Most of the time was being spent on how the agent was reading the page. Fixing that exposed another problem though. The old snapshot process was so slow that it was accidentally acting like a loading delay. Once it became fast, some elements were getting read before they had finished rendering. So I ended up adding a separate check for whether the page was actually ready to interact with, rather than relying on the snapshot being slow enough. submitted by /u/Stunning-Sherbet1853 [link] [comments]
Source: r/ollama | 2026-09-29