Skip to content

Commit 37aa0a4

Browse files
committed
perf: skip waiting for app record on hidden apps
1 parent 668f11b commit 37aa0a4

File tree

1 file changed

+2
-0
lines changed
  • packages/app-backend-core/src

1 file changed

+2
-0
lines changed

packages/app-backend-core/src/app.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ async function createAppRecord (options: AppRecordOptions, backend: DevtoolsBack
5454
const rootInstance = await backend.api.getAppRootInstance(options.app)
5555
if (rootInstance) {
5656
if ((await backend.api.getComponentDevtoolsOptions(rootInstance)).hide) {
57+
options.app._vueDevtools_hidden_ = true
5758
return
5859
}
5960

@@ -156,6 +157,7 @@ export async function getAppRecord (app: any, ctx: BackendContext): Promise<AppR
156157
if (record) {
157158
return record
158159
}
160+
if (app._vueDevtools_hidden_) return null
159161
return new Promise((resolve, reject) => {
160162
let resolvers = appRecordPromises.get(app)
161163
let timedOut = false

0 commit comments

Comments
 (0)