How hard to allocate ALL Python data space (hence offset-based) in a memory mapped file image?

Manuel M. Garcia mgarcia at cole-switches.com
Thu Dec 26 13:58:42 EST 2002


On Thu, 26 Dec 2002 14:51:18 +0100, Christian Tismer
<tismer at tismer.com> wrote:
(edit)
>> On 19 Dec 2002 06:51:08 GMT, bokr at oz.net (Bengt Richter) wrote:
>> (edit)
>>>   python -k mydist.pyk
>>>
>>>which would magically continue after the sys.checkpoint call and mydist.pyk
>>>would be the relevant mapped file ;-)
>> 
>> Wow! This would be fantastic! It would end defininately all the
>> complaints about Python's slowness at startup.
(edit)
>> I don't know if Jython or Stackless would be able to do
>> sys.checkpoint().  But it is more feasable for Jython or Stackless to
>> do this than CPython.
>
>This is a fact: There exists an extension to Stackless 1.0
>that enables nearly exactly that: It pickles one thread,
>which can be continued later, also on a different machine type.
>
>Unfortunately, Stackless 1.0 no longer exists.
>
>Fortunately, this feature will be re-invented in Stackless 3.0.

Wow! This is an amazing feature! It would benefit almost any embedded
use of Python, if not for startup speed, for source code obfuscation.
Initialize all your data structures, delete the references to the
initialization code to remove them from memory, then package.

Almost any use of Python other than one-time scripts would benifit
from the fast startup.  Just this one feature of Stackless would get a
lot of people to use it, besides the benefits of fast context switches
between Python threads.

Manuel



More information about the Python-list mailing list