Optimize nuitka compilation speed?

Viewed 826

I am using nuitka to compile my python 3.9 project, generate some executable files and some *.so modules.

As my project start using numpy and pandas, and some other libraries. The nuitka compilation time become too long to wait.

Is there any methods to optimize nuitka compilation time ?

For example, can I exclude numpy and pandas from packaging into executable files ?

1 Answers

Since it is likely, you are reusing exactly the same versions of pandas and NumPy code (along with dependencies), you should be able to generate the C code for these only once and reuse. On Linux this is typically done using tools like ccache. You may want to look into that.

I can see there is caching for the Visual Studio (Windows) world developed by Nuitka developers: clcache so you are likely to be a good installing ccache to be used by gcc (which transparently is picking up compiled objects - *.o files - when the code does not change).

Related