Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: allow detectComponents() to free event loop #1739

Merged
merged 1 commit into from
Jun 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions framework-plugins/preact/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const preactFrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
)
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down
2 changes: 2 additions & 0 deletions framework-plugins/react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ const reactFrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
)
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down
2 changes: 2 additions & 0 deletions framework-plugins/solid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ const solidFrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
)
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down
2 changes: 2 additions & 0 deletions framework-plugins/svelte/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const svelteFrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
))
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down
2 changes: 2 additions & 0 deletions framework-plugins/vue2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const vue2FrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
)
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down
2 changes: 2 additions & 0 deletions framework-plugins/vue3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ const vue3FrameworkPlugin: FrameworkPluginFactory = {
absoluteFilePath
)
);
// Ensure this potentially long-running function doesn't block the thread.
await 0;
}
return components;
},
Expand Down