help for a noob - version for a sharp ARM
On Fri Dec 8 08:07:16 CET 2006, Josiah Carlson wrote:
It appears that this ARM variant doesn't have a floating point coprocessor. http://www.sharpsma.com/Page.aspx/americas/en/part/LH7A404/ I hope we're dealing with those problem domains here. ;-)
I found that Python tries to import various modules when it starts up, so you might want to be a bit conservative with the ones you discard. However, if the target platform doesn't have libraries that various extension modules require then there's clearly no point in deploying those extensions. There are lots of irrelevant modules (for your application, at least) in the standard library. Anything that's platform-specific can go, apart from any Linux-specific modules, obviously, and even those might be unnecessary. I'm not sure if it's possible to automatically strip out Tkinter (lib-tk) and IDLE (idlelib), but it's probably worth doing so in your case. I should return to my own experiments and do all that again in a systematic way, just to see what can be removed.
Or there's that approach. A module dependency graph would be useful to have, or even just a list of modules that are required to get to the interactive prompt. It might also be worthwhile compiling all the pure Python modules to bytecode and discarding the sources, but only if the compiled code is smaller, of course.
Less than a second, I would imagine. Extension modules will also increase the loading time, especially if they need to be perform some tasks when they start.
It should be possible to compile a version of Python for the ARM922TDMI that uses Thumb instructions. These are 16 bit instructions that are expanded on the fly so that they can be processed by the CPU as normal 32 bit wide instructions. This doesn't mean that the resulting executable and libraries will be half the size that they would have been when compiled normally, but you may be able to save some storage space that way. I have no idea whether this trick will help you save RAM as well. David
participants (1)
-
David Boddie