Simon Willison’s Weblog

Subscribe

April 2022

70 posts: 5 entries, 15 links, 50 beats

April 28, 2022

Release datasette-gzip 0.2 — Add gzip compression to Datasette

Automatically opening issues when tracked file content changes

Visit Automatically opening issues when tracked file content changes

I figured out a GitHub Actions pattern to keep track of a file published somewhere on the internet and automatically open a new repository issue any time the contents of that file changes.

[... 1,211 words]

Release datasette-copy-to-memory 0.1a0 — Copy database files into an in-memory database on startup
Release datasette-copy-to-memory 0.1a1 — Copy database files into an in-memory database on startup
Release datasette-copy-to-memory 0.1a2 — Copy database files into an in-memory database on startup
Release datasette-copy-to-memory 0.1a3 — Copy database files into an in-memory database on startup

April 29, 2022

Testing Datasette parallel SQL queries in the nogil/python fork. As part of my ongoing research into whether Datasette can be sped up by running SQL queries in parallel I’ve been growing increasingly suspicious that the GIL is holding me back. I know the sqlite3 module releases the GIL and was hoping that would give me parallel queries, but it looks like there’s still a ton of work going on in Python GIL land creating Python objects representing the results of the query.

Sam Gross has been working on a nogil fork of Python and I decided to give it a go. It’s published as a Docker image and it turns out trying it out really did just take a few commands... and it produced the desired results, my parallel code started beating my serial code where previously the two had produced effectively the same performance numbers.

I’m pretty stunned by this. I had no idea how far along the nogil fork was. It’s amazing to see it in action.

# 5:45 am / gil, python, docker

April 30, 2022

Release datasette-copy-to-memory 0.2 — Copy database files into an in-memory database on startup

PyScript demos (via) PyScript was announced at PyCon this morning. It’s a new open source project that provides Web Components built on top of Pyodide, allowing you to use Python directly within your HTML pages in a way that is executed using a WebAssembly copy of Python running in your browser. These demos really help illustrate what it can do—it’s a fascinating new piece of the Python web ecosystem.

# 9:50 pm / python, web-components, webassembly, pyodide

None
TIL Intercepting fetch in a service worker — I'm learning service workers. I wanted to start with one that intercepts calls to a `/path` and returns "Hello World".

2022 » April

MTWTFSS
    123
45678910
11121314151617
18192021222324
252627282930