Skip to content

Bifrost Python Shell Support #60

@ccmcintyre-kingsds

Description

@ccmcintyre-kingsds

Importing Bifrost into a Python Shell / REPL which allows for line by line code execution by the user in real time immediately renders the environment unusable, slowing down even user input keystroke-by-keystroke into an excruciating and unreliable excercise. At its worst, this behaviour can even make the process difficult or impossible to exit, or even persist into the user's terminal session after exiting the Python Shell.

This has been observed on Ubuntu 18, Ubuntu 20, and Windows 7 through 10, in various versions of Python 3.

As Python is an interpreted language which is very frequently used as such in REPL environments, it is absolutely critical that we are able to support Python Shell usage of Bifrost.

I've tried lesioning the following pieces entirely out, and the behaviour still did not relent:

  • NodeSTDProc, in py_nodejs.py
  • inputStream, in main.js
  • evaluator, in main.js

I suspect either something related to the Python-side ReadWriteLock, or something related to the shared memory mapping subprocesses broadly. It could still be the streaming pipes as well, but if so, probably more diagnosable on the Python side. Further investigation will absolutely be required. I doubt that this will be a quick or easy solve, but it will probably lead to significant performance and functionality gains across the board, even outside of REPL usage, if we can figure this out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcacheRelates to variable hashing during syncenhancementNew feature or requestjavascriptRelates to JavaScript or Node.js codepipesRelates to interprocess streamingpythonRelates to Python codeshared memoryRelates to interprocess memory mapping

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions