Skip to content

Epic: Cold-paint perf + cache hygiene for dataset detail #66

Closed
3 of 3 issues completed
Closed

Description

@neuromechanist

Problem

Three independent issues degrade first paint on /dataset/<id>:

  1. GitHub roundtrip in the README hot path (Eliminate per-pageload GitHub roundtrip for README #63) — src/pages/api/dataset/[id]/readme.ts:97-101 resolves the README path from summary.json then still fires fetchGithubReadme(githubUrl) for the content. Direct dependency on a third-party host on every cold isolate.
  2. 3.3 MB monolithic BIDS tree (Progressive BIDS tree: render skeleton sync, lazy-load subject contents #64) — src/pages/api/dataset/[id]/tree.ts:86-87 ships the entire summary.paths list in one HTML blob. For on005505 that's 5,409 paths across 136 subjects in a single response; the file panel blocks for seconds before anything paints.
  3. SWR-poisoned cache entries (Edge-cache invalidation strategy for poisoned partials #65) — PR fix(api): no-store on tree/readme empty-fallback branches #54 stopped the future bleed by tagging fallback HTML no-store, but pre-fix entries with s-maxage=600 stale-while-revalidate=86400 still serve from any PoP for up to 24 h. on005505 still shows "No description available" / "Manifest unavailable" as of 2026-05-26.

Phases

Companion nemar-cli issues

Out of scope

  • Replacing the entire README or tree rendering pipeline. Each phase is additive with fallbacks intact.
  • BIDS-shaped download filenames (nemar-cli#513) and OpenNeuro modality backfill (nemar-cli#512).
  • New auth or routing logic.

Definition of done

  • All three sub-issues closed via merged PRs
  • Cold-isolate first paint for on005505 README in < 200 ms when nemar-cli#616 is live and backfilled
  • Cold-isolate tree skeleton paint in < 500 ms
  • No PoP serves a fallback-poisoned response 24 h after the cache-namespace bump deploys
  • Legacy schema 1.0 dataset rendering unaffected

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions