You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

为何Chrome(Windows)中Kantu 2.5.0脚本运行逐渐变慢?

Fix for Kantu 2.5.0 Script Slowing Down in Long Loops on Chrome 64

I’ve run into this exact slowdown issue with Kantu long-running loops before, especially on older versions like 2.5.0 paired with Chrome 64. The root cause usually boils down to memory bloat or inefficient loop scheduling. Here are some practical, tested fixes:

1. Add Memory Cleanup to Your Script

Over time, Kantu accumulates cached DOM elements and browser storage data, which drags down performance. Insert these commands into your loop (try running them every 10 cycles to balance cleanup overhead and memory savings):

store | true | !clearBrowserCache
store | true | !clearStorage

These commands wipe temporary cache and local storage, preventing memory leaks from slowing down your click actions.

2. Use Native Infinite Loop Syntax Instead of a Huge Loop Count

You don’t need to input 999999999 to simulate infinite loops—Kantu has built-in logic for this that’s far more efficient. Rewrite your script with a gotoIf loop:

label | loop_start
# Replace with your actual click command, e.g.:
click | css=.target-button
pause | 2000
gotoIf | true | loop_start

This native loop avoids the performance overhead of tracking an enormous loop counter, which is likely part of why your script slows down over time.

3. Optimize Chrome for Long-Running Scripts

Older Chrome versions can hog memory when running extensions for hours. Tweak these settings:

  • Disable unused extensions: Go to chrome://extensions/ and turn off everything except Kantu to free up memory.
  • Enable memory saver: Navigate to chrome://settings/system and toggle on "Memory saver" to auto-release memory from idle tabs.
  • Disable preloading: Turn off "Preload pages for faster browsing and searching" in chrome://settings/preload to cut down on background resource usage.

4. Periodically Restart the Kantu Extension

Since you’re using an older Kantu version (2.5.0), it might have memory leaks that can’t be fully fixed with script tweaks. Setting a reminder to restart Kantu every 1-2 hours will immediately reset its memory usage and restore your script’s original speed.

内容的提问来源于stack exchange,提问作者Elemenop

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:51:53