-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
-
0
-
0
Python compiles its source code into a file called a bytecode file. If the modification time (mtime) of the source file matches the mtime specified in the bytecode file, python knows that the source file has not changed and the bytecode file is reused (ie. a cache).
On ostree based systems, the mtime of the python source files are set to zero whenever a new commit is deployed. Therefore, the mtime specified in the existing bytecode files do not match anymore and need to be recompiled, causing the slow runtime.
The workaround solution is to set the mtime specified in the bytecode files to zero as well. The more sustainable solution is to use composefs in the future.