10x faster python test iteration via fork(2)
Case study 8 min +80 XP
Benchling cut Python test iteration from 10 seconds to about 1 second by preloading slow-to-import dependencies and SQLAlchemy models in a parent process, then fork()ing a child that imports the changed app and test code, in the style of Rails' zeus. importlib.reload() fails because reverse dependencies keep stale bindings.