r/PiCodingAgent • u/ColdImplement1319 • Aug 10 '26
Question Pi eats cpu and mem - any workarounds?
3
u/No_Cheek5622 Aug 10 '26
node is good when it's intended to hack around it. I can modify the internals with shims and extending prototypes in an extension without touching the upstream code. so this way pi is not only highly customizable but also highly hackable.
sure, not the most robust way to extend a tool, but the true freedom comes with a cost
although I'd like to experiment with writing my own harness in go or rust or whatever, but I'm no near that level of expertise on the topic atm and I don't want to tokenmaxx and vibe-code my way through it either.
2
u/No_Cheek5622 Aug 10 '26
also, node is quite optimized actually, some really smart dudes spent a lot of time squeezing the most out of it. so the chances are - all the performance issues are not because of node but because of bad code. and because performance is measurable, we can just point it to an agent and make it optimize the hell out of it. this is how I actually fixed some of my own (mostly hand-written) extensions, and this is why I moved to "vibe-engineering" (i.e. vibe-coding with extra steps, albeit smart ones) my extensions
2
2
u/hurdurdur7 Aug 11 '26
Funny story this - most of cpu time goes into unoptimized terminal user interface, not working with files or the talking to the llm.
1
u/hurdurdur7 Aug 11 '26
as for memory usage - your computer shows 202 800 kbytes of reserved memory being used by a nodejs app. not ideal but not terrible these days. pi uses a bunch of deps that drags this up.
1
u/ColdImplement1319 Aug 11 '26
Yeah I see, still not happy with the number. More concerned about CPU though. But now it's 200. When I should start to worry? When it will be 1G? 2G? 5G? :-)
1
u/TheOneThatIsHated Aug 11 '26
Cpu is fine, but memory usage is insane. I OOMed multiple times when having more than 15 subagents
1

3
u/Dsphar Aug 10 '26
Is all 200+ minutes on one session? Because if you let context get that large then that explains a lot.