Files
Duriin-API/public/admin/app.html
ImBenjiandClaude Opus 5 40f098129c perf: preload the ops module graph
Admin assets are no-store, so every load refetches all of them, and es module
imports are discovered one level at a time: main parses, then its imports are
found, then theirs. Preload hints turn that waterfall into one parallel burst.
The hrefs deliberately carry no version query because they have to byte-match
what the import specifiers resolve to, otherwise the browser fetches each module
twice instead of reusing the preload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WnNxwxfXSbeNtjvtz5gayb
2026-09-01 20:26:43 +01:00

39 lines
1.8 KiB
HTML

<!doctype html>
<html lang="en" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Duriin Ops</title>
<link rel="stylesheet" href="/admin/assets/css/ops.css?v=20260901-1">
<link rel="preconnect" href="https://cdnjs.cloudflare.com">
<!-- Admin assets are served no-store so an operator can never run stale UI against
a fresh api. That means every module is refetched every load, and left alone
they arrive in a waterfall: main is parsed, then its imports are discovered,
then theirs. Preloading flattens that into one parallel burst. -->
<link rel="modulepreload" href="/admin/assets/js/ops/core.js">
<link rel="modulepreload" href="/admin/assets/js/ops/ui.js">
<link rel="modulepreload" href="/admin/assets/js/ops/overview.js">
<link rel="modulepreload" href="/admin/assets/js/ops/controls.js">
<link rel="modulepreload" href="/admin/assets/js/ops/explore.js">
<link rel="modulepreload" href="/admin/assets/js/ops/sql.js">
</head>
<body>
<div id="root">
<div class="boot">
<div class="boot-mark">DURIIN</div>
<div class="boot-note">loading console…</div>
</div>
</div>
<!-- UMD builds, no bundler and no in-browser transpiler. htm gives us JSX-ish
tagged templates for ~700 bytes, which is the whole reason we can skip Babel
standalone -- that thing compiles on every page load and is exactly the kind
of slow we are trying to get away from. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.3.1/umd/react.production.min.js" crossorigin></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.3.1/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/htm/3.1.1/htm.js" crossorigin></script>
<script type="module" src="/admin/assets/js/ops/main.js"></script>
</body>
</html>