File tree Expand file tree Collapse file tree
packages/plugins/microsoft/src/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -806,7 +806,7 @@ describe("Microsoft Graph per-workload add flow", () => {
806806 ) ,
807807 ) ;
808808
809- it . effect ( "addWorkloads runs workload spec fetches in bounded parallel " , ( ) =>
809+ it . effect ( "addWorkloads runs workload spec fetches serially " , ( ) =>
810810 Effect . scoped (
811811 Effect . gen ( function * ( ) {
812812 const workloads = [ { presetId : "mail" } , { presetId : "calendar" } , { presetId : "files" } ] ;
@@ -841,7 +841,7 @@ describe("Microsoft Graph per-workload add flow", () => {
841841 workloads . map ( ( workload ) => workload . presetId ) ,
842842 ) ;
843843 expect ( specFetchCount ) . toBe ( workloads . length ) ;
844- expect ( maxActiveSpecFetches ) . toBe ( workloads . length ) ;
844+ expect ( maxActiveSpecFetches ) . toBe ( 1 ) ;
845845 } ) ,
846846 ) ,
847847 ) ;
Original file line number Diff line number Diff line change @@ -140,7 +140,11 @@ export interface MicrosoftPluginOptions {
140140}
141141
142142const DEFAULT_MICROSOFT_SLUG = "microsoft_graph" ;
143- const MICROSOFT_ADD_WORKLOADS_CONCURRENCY = 4 ;
143+ // Serial on purpose: every workload add stream-compiles the 37MB Graph spec,
144+ // and concurrent compiles contend on event-loop CPU and the request's single
145+ // DB connection (measured: parity at best, 20-40x stalls at tail) while
146+ // stacking multiple 37MB spec strings inside the 128MB Workers isolate.
147+ const MICROSOFT_ADD_WORKLOADS_CONCURRENCY = 1 ;
144148
145149const isMicrosoftPresetWorkloadConfig = (
146150 workload : MicrosoftWorkloadConfig ,
You can’t perform that action at this time.
0 commit comments