mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] component: emit warning when async hooks take too long
This commit adds a warning when an async hook (onWillUpdateProps/onWillStart) takes longer than 3 seconds, as these hooks block the rendering and patching of the application, it is rarely desirable and often a sign of a deadlock. This warning will contain the stack trace of the call to the hook to help in debugging.
This commit is contained in:
committed by
Géry Debongnie
parent
47c6d6cc3c
commit
77ff5ee895
+1
-1
@@ -49,7 +49,7 @@ export async function nextTick(): Promise<void> {
|
||||
|
||||
interface Deferred extends Promise<any> {
|
||||
resolve(val?: any): void;
|
||||
reject(): void;
|
||||
reject(val?: any): void;
|
||||
}
|
||||
|
||||
export function makeDeferred(): Deferred {
|
||||
|
||||
Reference in New Issue
Block a user