tr
TryGhost
GitHub
Ghost
Workspace
GitHub
CI Pipeline Executions
Current execution
Succeeded
perf-drop-date-fns-barrel-from-boot-path
Runs and Agents
Configuration
Self-Healing CI
Project Graph
Resource Usage
Analysis
Conformance
Runs
Current run
Succeeded
Tasks
Resource Usage
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Improved boot time by dropping the date-fns barrel import ref https://github.com/TryGhost/Ghost/pull/29305 - a bisect of boot time found a ~120ms step at #29305, which moved the route-settings read path onto the adapter-backed store; the store's module graph reaches utils.ts, which imported the whole date-fns barrel (313 modules) - before that commit the boot path only loaded the date-fns/format subpath (35 modules) via the since-deleted settings-path-manager, so this was a straight regression rather than a newly introduced cost - format is only used to build the timestamped backup filename in getBackupRouteSettingsFilePath, whose only callers are FileStore.replace and S3RouteSettingsStore.replace - the routes.yaml upload path. Boot never runs it - hand-rolled the timestamp rather than switching to the subpath import: the subpath still loads 35 modules at boot, and leaves the barrel one "organise imports" away from silently re-landing. Removing the dependency instead makes that un-reintroducible - date-fns no longer resolves from ghost/core at all - yyyy-MM-dd-HH-mm-ss has no locale- or timezone-dependent tokens, so the output is unchanged for any valid Date
nx run ghost-monorepo:lint:boundaries
⌘K
Succeeded
nx run ghost-monorepo:lint:boundaries
Click to copy
Linux
4 CPU cores
f18bbab1
29771