Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Testing Remove topic Testing Clear all 1 posts RSS

Thursday, Jul 20, 2023

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.

The quest for software engineering knowledge.

Look:
Layout: