Given a large (4.5 GB codebase) python testing framework whose execution involves many tens of files, many of which are not directly pickle-able, is it possible to wrap initial execution of the program in a one line function, create a Stackless tasklet around that function, and, during execution, pickle the tasklet as a way of saving the whole program's state? What is the limit of Stackless' tasklet pickling capabilities?
Using Stackless Python to save the state of a large running program?
294 Views Asked by bsm At
2
There are 2 best solutions below
0
Kristján Valur
On
To be more concrete:
Stackless adds pickling support to a number of built in elements, such as execution frames and modules and other runtime objects
However, code, such as classes, functions and modules, are all pickled by name. What this means is that on the other machine, the same objects must be accessable through the import mechanism.
In other words, the pickled execution state will contain the current local variables and all that, but the contents of code objects, or modules will not be picled. These need to be accessible by name when the state is unpickled.
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in STATE
- NextJS 13 14, Store server state globally
- My state is undefined despite being setted
- Next.js carousel component loads instagram basic display api perfectly except in Safari browser
- How can I create a javascript animation that recognizes when it hits things, in other words a hit box?
- Flutter - When an element is deleted from the ListView, the state of the element under deletion is reset
- State Transfer from a model using Riverpod flutter
- React components don't re render when the state is changed
- Flutter | Persisting Navigator State Using Hydrated Bloc with the Bloc Design Pattern
- Wait set state finishes to call another function
- keyboard focus with GTK4 Rust does not work as expected and how to get state
- Bind state to context value in React JS
- I have a problem when I run on the web Bad state: databaseFactory not initialized databaseFactory
- How to manage state in a chrome extension in this scenario
- Should I use immutable or mutable state for a JSON tree editor in Flutter?
- React Component doesn't change states until file is resaved, then runs both at same time
Related Questions in PYTHON-STACKLESS
- How to do infinite (or really deep) recursions in Stackless Python?
- Embedded python not picking up PYTHONPATH
- parallel computations with task manager
- Couldn't find index page for 'stackless_installer_c4_win32' (maybe misspelled?)
- Factory returning boost exposed python object seg faults
- stackless python and multiprocessing slowdown
- python program without stackless.run()
- Sleep instead of thread.join() for platform legacy reasons
- How robust is `func(*argument)`?
- Create tasklets at runtime
- How can I use stackless python on heroku?
- Aren't Python tasklets breaking the rule of no "GOTO"?
- stackless python constructor
- PyCharm can't resolve stackless
- Install Stackless without uninstalling Python
Related Questions in STACKLESS
- Is there a stackless and heapless programming language?
- Resume ASIO Stackless Coroutine
- Robson tree traversal algorithm
- Does Pypy's stackless thread option support parallel execution?
- Which JVM languages are stackless?
- Stackless Scala With Free Monads, complete example
- Using Stackless Python to save the state of a large running program?
- Does coroutine stacks grow in Lua, Python, Ruby or any other languages?
- windows 8 incompatibility?
- Simulating threads scheduling in java (stackless java?)
- Are there stackless or heapless implementation of C++?
- Would C/C++/Pascal/etc. be substantially slower if it was a stackless language?
- How to eliminate this type of recursion?
- Is it possible to serialize tasklet code (not just exec state) using SPickle without doing a RPC?
- Is it possible to use stackless python 2.7.2 with pythondotnet?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
This is indeed a possibility offered by Stackless Pickling
So to our question "is it possible" the answer is "yes".
As a matter of "how to do it", I think the link above provide a concrete example. Try it and post an other question if it doesn't work. Given the size of your code base (4.5GB of Python source files is rather huge!), maybe you will reach the limits of Stackless?