A static build writes /api/{model}/{uuid}/places.json for every record, and each file carries the full shape of every related place. Large regions get copied into every record that links to them. On a static build of Global Writing Cultures, with about 1,000 events and 460 place shapes, these files come to 1.3 GB, most of the site's size. The outline of France alone is 15 MB, and some region outlines are repeated in 40 or more events.
Given:
- Each place's shape is already written once to
/api/geometry/{uuid}.json.
- The record pages draw their related-places map at build time from the data store, not from these files.
Update the site so that:
- the related-places files list each place without its shape, and a place's shape is read from
/api/geometry/ where something needs it.
Part of #710
A static build writes
/api/{model}/{uuid}/places.jsonfor every record, and each file carries the full shape of every related place. Large regions get copied into every record that links to them. On a static build of Global Writing Cultures, with about 1,000 events and 460 place shapes, these files come to 1.3 GB, most of the site's size. The outline of France alone is 15 MB, and some region outlines are repeated in 40 or more events.Given:
/api/geometry/{uuid}.json.Update the site so that:
/api/geometry/where something needs it.Part of #710