Repository navigation
CPU Usage Increased Significantly in Latest Commit #51
Description
Activity
I investigated this and could not reproduce the idle CPU regression on the current
main, or on the two commits in the report.I launched the exact session form,
crabcode -s obx, in a PTY, waited 5 seconds, then sampled CPU for 6 seconds:a8a1bd6: 2.6%, 0.1%, then 0.0% for the remaining samples (0.45% mean)279e1f7: 1.5%, 0.2%, then 0.0% for the remaining samples (0.28% mean)- current
main: 0.0% across all 8 samples after the same 5-second settle period
The home-screen animation is intentionally stopped after 3 seconds of inactivity, and the event loop then blocks for up to 30 seconds awaiting terminal input.
Could you share the OS/distribution, terminal emulator, exact release/binary (
crabcode --version), and whether the session is still actively streaming or has background jobs running when sampled? Theps %CPUoutput strongly suggests a 20 Hz redraw loop is still active, but I need that state to identify which condition is keeping it awake.I investigated this and could not reproduce the idle CPU regression on the current
main, or on the two commits in the report.I launched the exact session form,
crabcode -s obx, in a PTY, waited 5 seconds, then sampled CPU for 6 seconds:a8a1bd6: 2.6%, 0.1%, then 0.0% for the remaining samples (0.45% mean)279e1f7: 1.5%, 0.2%, then 0.0% for the remaining samples (0.28% mean)- current
main: 0.0% across all 8 samples after the same 5-second settle period
The home-screen animation is intentionally stopped after 3 seconds of inactivity, and the event loop then blocks for up to 30 seconds awaiting terminal input.
Could you share the OS/distribution, terminal emulator, exact release/binary (
crabcode --version), and whether the session is still actively streaming or has background jobs running when sampled? Theps %CPUoutput strongly suggests a 20 Hz redraw loop is still active, but I need that state to identify which condition is keeping it awake.I compiled it myself using the latest commit. When I checked the CPU usage after some chats, maybe 3–7 chats, the CPU usage was quite high.
CrabCode 0.0.12
OS: Android 13 (Termux latest beta)
OS: Debian Trixie ARM64 on TV Box (Amlogic S905X)
In commit a8a1bd6, CPU usage was very light, staying below 10%. However, in the latest commit, 279e1f7, CPU usage is considerably higher, as shown below:
Data log monitor
Hopefully, CPU usage can be optimized further in the next version.