Optimization
Performance & Page Weight Audit
Audit of load performance characteristics for the Teleodynamic AI research section. Documents CSS/JS weights, inline style consolidation, and optimization recommendations.
CSS Consolidation (v1.9.0)
In v1.9.0, inline <style> blocks from 4 views were extracted into site.css:
| View | Classes Extracted | Bytes Removed | Status |
|---|---|---|---|
| TeleodynamicConceptMap.cshtml | .concept-map-grid, .cm-node, .cm-rel, .cm-col-header, .cm-node-tooltip (10 classes) | ~1,200 bytes | Extracted |
| TeleodynamicRoadmap.cshtml | .roadmap-timeline, .roadmap-phase, .roadmap-phase.done/current/planned/future (7 classes) | ~500 bytes | Extracted |
| TeleodynamicOnboarding.cshtml | .wizard-steps, .wizard-step, .wizard-panel (6 classes + responsive) | ~800 bytes | Extracted |
| TeleodynamicDashboardMetrics.cshtml | .metric-card, .metric-value, .bar-chart, .bar (6 classes) | ~500 bytes | Extracted |
Total CSS saved: ~3,000 bytes moved from inline to shared stylesheet. Total CSS added to site.css: ~4,200 bytes (includes new shared classes + light theme + print styles).
Page Weight Estimates
Estimates for representative pages. HTML excludes shared layout (topbar, footer).
| Page | HTML (est.) | Inline CSS | Inline JS | Total |
|---|---|---|---|---|
| Main Overview | ~8 KB | 0 | 0 | ~8 KB |
| Template Builder | ~6 KB | 0 | ~8 KB | ~14 KB |
| Search | ~3 KB | 0 | ~5 KB | ~8 KB |
| PDF Report | ~4 KB | 0 | ~4 KB | ~8 KB |
| API Examples | ~5 KB | 0 | ~1 KB | ~6 KB |
| Concept Map | ~6 KB | 0 (extracted) | 0 | ~6 KB |
| Roadmap | ~5 KB | 0 (extracted) | 0 | ~5 KB |
| Onboarding | ~5 KB | 0 (extracted) | ~1 KB | ~6 KB |
| Dashboard Metrics | ~4 KB | 0 (extracted) | 0 | ~4 KB |
Shared assets: site.css ~6 KB, Bootstrap CSS ~190 KB (cached), Bootstrap JS ~60 KB (cached), site.js ~1 KB. These are loaded once and cached across all pages.
Recommendations
- Done (v1.9.0): Extracted inline CSS from Concept Map, Roadmap, Onboarding, Dashboard Metrics into site.css.
- Done (v1.9.0): Consolidated walkthrough, version timeline, search, and API example styles into site.css.
- Deferred: Page-specific JS (template builder ~8 KB, search index ~5 KB, evidence archive ~3 KB) must remain inline — they contain hardcoded data or page-specific logic.
- Deferred: Bootstrap CSS/JS — consider switching to a minimal subset (~40 KB vs 190 KB) for the research section only. Full Bootstrap is required for the main site dashboard.
- Deferred: Add cache-control headers for static assets — site.css and site.js should be versioned with hash for long-term caching.