jupyter-book / mystmd

Command line tools for working with MyST Markdown.
https://mystmd.org/guide
MIT License
219 stars 65 forks source link

High CPU usage by node #1562

Closed jkmacc closed 1 month ago

jkmacc commented 1 month ago

Hi all. Thank you for this fantastic package!

I'm getting 250% CPU usage when I run myst start, no matter which version of node I use or whether I install everything using npm or conda. I'm on an Intel Mac.

╰❯ node -v
v22.9.0

╰❯ npm -g list
/usr/local/lib
├── mystmd@1.3.11
└── npm@10.8.3

Has anyone else experienced this and looked into a fix? Even a suggestion about how to debug this (I'm not a node guy) would be much appreciated. I just can't spare this much CPU.

Thank you again!

rowanc1 commented 1 month ago

We have seen this before when it is polling a large numbers of files in the directory. Can you share more about your directory structure?

On most sites, CPU should go to zero when idle.

jkmacc commented 1 month ago

That was it! I had a 850Mb pyenv directory (that I don't recall creating!) in my root directory that was causing the problem. Blew it away, and it's down to about %5.

Thank you so much!

rowanc1 commented 1 month ago

Awesome - if you do need those in future there is an exclude option in the frontmatter!

Glad you are setup.

jkmacc commented 1 month ago

Was just going to ask!