Course videos and images sync again

When a space is synced from a git repository, the files committed under its content/ folder — course videos, posters, images, fonts, anything that is not text — are copied into the space so the portal can serve them. That copy was sent as one message carrying every file in the space at once.

For a space with a handful of small images, that worked and nobody noticed. For a course with video in it, it did not. One space in the education repository holds 28 MB of video across ten files; another holds 106 MB across twelve. Packaged for transport, those become roughly 38 MB and 141 MB — and a message is copied and re-encoded several times on its way, each copy costing several times its own size again.

The two ends of that produced two different failures, both silent from the outside:

What changed. The sync no longer builds one message. It writes the files in batches sized to what the platform can comfortably carry, one batch at a time, so the cost of a sync no longer grows with the amount of content a space holds. A single very large file still travels on its own, which is far cheaper than travelling with everything else.

The part that deletes files the repository no longer carries still happens exactly once, and still measures the folder against the complete set of files being synced — so nothing is deleted because it happened to travel in a different batch, and, as before, a file you uploaded yourself that the repository never tracked is left alone.

What you should notice: syncing a space with videos or large images in it now works, and a big sync no longer competes with everything else the portal is doing. Spaces small enough to have been working all along behave exactly as they did.

Reconnecting…
The server was updated. Reloading the page to pick up the latest version.