@@ -8,7 +8,6 @@ import { CompassElectron } from './components/entrypoint';
88import { openToast , ToastBody } from '@mongodb-js/compass-components' ;
99import ensureError from 'ensure-error' ;
1010
11- import * as marky from 'marky' ;
1211import * as webvitals from 'web-vitals' ;
1312import React from 'react' ;
1413import ReactDOM from 'react-dom' ;
@@ -126,21 +125,6 @@ class Application {
126125 }
127126 }
128127
129- /**
130- * Pre-load into the require cache a bunch of expensive modules while the
131- * user is choosing which connection, so when the user clicks on Connect,
132- * Compass can connect to the MongoDB instance faster.
133- */
134- private preloadSlowModules ( ) {
135- marky . mark ( 'Pre-loading additional modules required to connect' ) ;
136- // Seems like this doesn't have as much of an effect as we'd hoped as
137- // most of the expense has already occurred. You can see it take 1700ms
138- // or so if you move this to the top of the file.
139- require ( 'local-links' ) ;
140- require ( 'mongodb-instance-model' ) ;
141- marky . stop ( 'Pre-loading additional modules required to connect' ) ;
142- }
143-
144128 /**
145129 * Called a soon as the DOM is ready so we can
146130 * start showing status indicators as
@@ -466,9 +450,6 @@ class Application {
466450 }
467451
468452 async init ( ) {
469- marky . mark ( 'Time to Connect rendered' ) ;
470- marky . mark ( 'Time to user can Click Connect' ) ;
471-
472453 // Setup global error handling first to ensure all
473454 // unhandled errors are properly logged and reported
474455 this . setupGlobalErrorHandling ( ) ;
@@ -498,11 +479,6 @@ class Application {
498479
499480 // Render the application
500481 await this . render ( ) ;
501- marky . stop ( 'Time to Connect rendered' ) ;
502-
503- // Preload modules and complete initialization
504- this . preloadSlowModules ( ) ;
505- marky . stop ( 'Time to user can Click Connect' ) ;
506482
507483 // Throws a synthetic exception for e2e tests so we can test the handling
508484 // of uncaught exceptions.
0 commit comments