Skip to content

ENG-1668: Perf: slow load time#984

Open
sid597 wants to merge 6 commits intomigration-block-init-staging-branchfrom
eng-1668-perf-slow-load-time
Open

ENG-1668: Perf: slow load time#984
sid597 wants to merge 6 commits intomigration-block-init-staging-branchfrom
eng-1668-perf-slow-load-time

Conversation

@sid597
Copy link
Copy Markdown
Collaborator

@sid597 sid597 commented Apr 24, 2026

Results (sid's machine 6X throttle)

Flag On: 1730ms

[DG Load] refreshConfigTree: 1058ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] bulkReadSettings: 16ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initPostHog: 33ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initFeedbackWidget: 5ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initPluginTimer: 1ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initializeDiscourseNodes: 412ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] addGraphViewNodeStyling: 2ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] registerCommandPaletteCommands: 10ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] createSettingsPanel: 2ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] registerSmartBlock: 0ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] setInitialQueryPages: 1ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] addStyle (all): 0ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initObservers: 74ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] listeners + queryBuilder: 33ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] installDiscourseFloatingMenu: 5ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG BlockProps Migration] graph-level: skipped (already migrated)
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG BlockProps Migration] personal: skipped (already migrated)
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] initSchema: 75ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Load] setupPullWatchOnSettingsPage: 2ms
f0527742-8005-4e3c-91f4-ff7d06c97650:975 [DG Plugin] Total load: 1730ms

Flag Off:

  dev-load-extension extension:  test-dg-build                                                                                                                                 
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] refreshConfigTree: 662ms                                                                                                  
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] bulkReadSettings: 134ms                                                                                                   
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initPostHog: 35ms                                                                                                         
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initFeedbackWidget: 5ms                                                                                                   
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initPluginTimer: 0ms                                                                                                      
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initializeDiscourseNodes: 8ms                                                                                             
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] addGraphViewNodeStyling: 2ms                                                                                              
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] registerCommandPaletteCommands: 9ms                                                                                       
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] createSettingsPanel: 1ms                                                                                                  
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] registerSmartBlock: 2ms                                                                                                   
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] setInitialQueryPages: 0ms                                                                                                 
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] addStyle (all): 0ms                                                                                                       
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initObservers: 261ms                                                                                                      
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] listeners + queryBuilder: 236ms                                                                                           
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] installDiscourseFloatingMenu: 5ms                                                                                         
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG BlockProps Migration] graph-level: skipped (already migrated)                                                                   
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG BlockProps Migration] personal: skipped (already migrated)                                                                      
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] initSchema: 80ms                                                                                                          
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Load] setupPullWatchOnSettingsPage: 2ms                                                                                         
  6f932464-a43b-401c-9652-5aa0b1b0abb4:975 [DG Plugin] Total load: 1441ms     

Open in Devin Review

…ConfigTree

Remove initDiscourseNodePages (and helpers hasNonDefaultNodes,
initSingleDiscourseNode) from initSchema — migrateDiscourseNodes already
handles block prop writes, making this redundant on every load.

Make the second refreshConfigTree(settings) conditional — only runs when
initializeDiscourseNodes actually creates pages (first install). On
existing graphs the tree is identical to what the first call already read.
@linear-code
Copy link
Copy Markdown

linear-code Bot commented Apr 24, 2026

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 24, 2026

This pull request has been ignored for the connected project zytfjzqyijgagqxrzbmz because there are no changes detected in packages/database/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant