719332d272
We currently serve icons in the form of 141 separate svg files. This is pretty inefficient: it results in 141 http requests each with its own overheads and costs. Each one is generally less than 1kb of data. This PR merges all of our icons into a single 44kb icon file. Each item in the svg has an ID, and we use the ID in the asset url to target the specific icon. This also fixes a lot of the icon preloading issues: because the icon file is already loaded, there's no extra request needed when panels open etc. I was messing with this whilst killing time before a late meeting so made a shitty overengineered code generator, dont at me ### Change type - [x] `improvement` ### Release notes - Serve icons more efficiently, and make sure they're still available if tldraw goes offline. |
||
---|---|---|
.. | ||
lib | ||
vercel | ||
workers | ||
api-check.ts | ||
build-api.ts | ||
build-package.ts | ||
CHANGELOG.md | ||
check-scripts.ts | ||
check-tsconfigs.ts | ||
check-worker-bundle.ts | ||
clean.sh | ||
deploy-bemo.ts | ||
deploy-dotcom.ts | ||
license-report.ts | ||
lint.ts | ||
package.json | ||
postpack.sh | ||
prepack.ts | ||
prune-preview-deploys.ts | ||
publish-canary.ts | ||
publish-manual.ts | ||
publish-new.ts | ||
publish-patch.ts | ||
publish-vscode-extension.ts | ||
purge-css.ts | ||
refresh-assets.ts | ||
tsconfig.json | ||
typecheck.ts | ||
update-pr-template.ts | ||
upload-static-assets.ts |