Skip to content

Metadata bundle: lazy-load key features and data availability #1003

Open

Description

@jacobvjk

All pathway metadata is bundled and loaded up front on every page (import.meta.glob in src/data/pathwayMetadata.ts). With #1000 the metadata JSON grows from 0.90 MB to 4.76 MB. 3.09 MB of that is the 21 NGFS pathways, each carrying about 140 KB of key features (about 1,450 scoped entries per file).

Most pages need only the summary fields: name, publisher, type, sectors, regions and metrics. keyFeatures and dataAvailability are needed only on a pathway's detail page and by some search filters.

Options to evaluate:

  • Split each pathway into a summary that loads eagerly and a detail chunk that is lazy-loaded with a dynamic import.
  • Precompute the search facets the filters need, so search doesn't require the full key features.

Raised in review of #1000.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions