-
Notifications
You must be signed in to change notification settings - Fork 0
Reduce 3.4MB solar system generated file impact #36
Copy link
Copy link
Open
Labels
performancePerformance-related issuesPerformance-related issues
Description
Priority: P2
Source
Senior Architect Code Review (2026-04-03)
Problem
packages/shared-types/src/solarSystems.generated.ts is 3.4MB of bundled solar system catalog data. This file is imported by the dashboard and API via the shared-types package. The size impacts:
bun installandnode_modulesbloat- IDE performance (indexing, autocomplete)
- Potentially client-side bundle size if not properly tree-shaken
- CI cache sizes
Affected Files
packages/shared-types/src/solarSystems.generated.ts(3,457,433 bytes)packages/shared-types/src/solarSystems.tsscripts/update-solar-systems.ts
Recommendation
Options to evaluate:
- Lazy-load the data — export the catalog as a function that dynamically imports the data, so it is only loaded when needed
- Separate data package — move the generated catalog to its own
packages/solar-system-datapackage so the core shared-types remain lightweight - JSON instead of TS — store as
.jsonand import withresolveJsonModule, which may be more IDE-friendly - Compress + decompress — store as a compressed binary and decompress at runtime (extreme, probably not worth it)
- API-served — serve the catalog from the API and remove it from the client bundle entirely
Acceptance Criteria
- The shared-types package is under 100KB excluding the solar system data
- Solar system lookups still work in both dashboard and API
- IDE performance is not degraded by the data file
- Client bundle size is verified to not include unused solar system entries
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
performancePerformance-related issuesPerformance-related issues