Building python takes longer than an hour due to freezing objects, and still counting

Hi, I wanted to do a few performance enhancements to string decoding and I need to benchmark that. So I need to build python.

make -j

I have 12 virtual cores on my CPU, and this used to take only a few minutes. (I know that for true benchmarking, I need to pass the optimization flags, but for quick prototyping I do something that builds a little faster to get an idea.)

Unfortunately this hangs on:

./_bootstrap_python ./Programs/ abc ./Lib/ Python/frozen_modules/abc.h
./_bootstrap_python ./Programs/ codecs ./Lib/ Python/frozen_modules/codecs.h
./_bootstrap_python ./Programs/ io ./Lib/ Python/frozen_modules/io.h
./_bootstrap_python ./Programs/ _collections_abc ./Lib/ Python/frozen_modules/_collections_abc.h
./_bootstrap_python ./Programs/ _sitebuiltins ./Lib/ Python/frozen_modules/_sitebuiltins.h
./_bootstrap_python ./Programs/ genericpath ./Lib/ Python/frozen_modules/genericpath.h
./_bootstrap_python ./Programs/ ntpath ./Lib/ Python/frozen_modules/ntpath.h
./_bootstrap_python ./Programs/ posixpath ./Lib/ Python/frozen_modules/posixpath.h

I see the processes are now busy for 40 minutes. This is ridiculously long and completely unworkable. Does anyone know how I can get my ./python executable a bit faster?

EDIT: It is over an hour now?! Is this a hidden cryptocurrency miner? This seems more like a bug than intended behavior.

It is something in either the .vscode or the .idea folder. Deleting those solved the issue.

1 Like

Were you compiling from within VSCode or IntelliJ IDE’s shell? In VS Code the shell is some sort of JS implementation. It’s not unusual for it to play up, but I can’t think why it would affect an external process once it’s launched it.

In the Pycharm IDE shell. I also don’t know why it played up. I managed to finish the PR I am working on. If the issue plays up again I will do a more thorough investigation.

1 Like

It turns out to be the PyCharm IDE terminal that causes the hang. I can do it on a normal terminal emulator just fine.
Annoying, but workable.