wrye-bash / wrye-bash

A swiss army knife for modding Bethesda games.
https://wrye-bash.github.io
GNU General Public License v3.0
455 stars 79 forks source link

Revisit Nuitka and PyOxidizer #660

Open Infernio opened 1 year ago

Infernio commented 1 year ago

PyInstaller's binaries are basically just self-extracting ZIP archives. The problem with that is that it has become quite slow - especially if your temporary directory (which is where the extracted files go) is on an HDD - due to multiple reasons:

I've investigated Nuitka a bit (it seems to now support building a single EXE). The build takes quite a long time, but the resulting EXE does not suffer from the same startup issue (which makes sense - it truly builds an executable, rather than a self-extracting ZIP). scratch that, the startup speedup seems to only happens in onedir mode, not in onefile mode. Which makes sense, maybe we should first investigate onedir mode in PyInstaller? One problem is that pkgutils.iter_modules does not seem to work with it. Another is that it appears to need a .cmd file. And finally, it does not support Python 3.11 yet.

I also want to check back in with PyOxidizer and see how that project is coming along.

312+ territory, plus we'll probably want to keep this optional if we go with Nuitka so that we're not blocked if another Python 3.11-like scenario comes where Nuitka will take a long time to upgrade.

Followup to #491, obsoletes #609.

lojack5 commented 1 year ago

Been checking in periodically with Nuitka myself, that would be an amazing option. It'd be a large speed bump due to the transpiling. But yep, it always seems to be 2 or more versions behind the current CPython (looks like only 1 version behind at the moment though!)

3.12 so far isn't bringing any super high features, but it's still in alpha. If it doesn't end up bringing anything big we want I'd say wait for 3.11 support on Nuitka.