Interesting. I wonder if inspect.getmodule() even *can* work in a bundled app. Because imported modules are not stored in files but in an archive embedded in the executable[1], so they are invisible to the OS. Perhaps the bootloader sets up the import machinery so well that getmodule() can do its job, but I would not assume that.
If it is a matter of a single missing file, you can ensure it exists where the bundled app runs[2]. But in any case, if this debug-central thing is being called 35K times in a typical run -- to me that suggests "memoization here". Given the typical locality of code execution, it probably gets called from the same module many times in succession, then from another one etc. So even a small LRU cache of module names could be a big win. [1] http://pythonhosted.org/PyInstaller/#inspecting-archives [2] http://pythonhosted.org/PyInstaller/#adding-files-to-the-bundle -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyinstaller. For more options, visit https://groups.google.com/d/optout.
