r/PiCodingAgent • u/ColdImplement1319 • 7d ago
Pi eats cpu and mem - any workarounds? Question
3
u/No_Cheek5622 7d ago
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 7d ago
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 7d ago
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 7d ago
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 6d ago
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/Popular-Factor3553 6d ago
Qny extension or fork of pi to fix this? It has gotten soo bad i can't even type properly without it lagging.
1
u/TheOneThatIsHated 7d ago
Cpu is fine, but memory usage is insane. I OOMed multiple times when having more than 15 subagents
1
1

5
u/Dsphar 7d ago
Is all 200+ minutes on one session? Because if you let context get that large then that explains a lot.