mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] app: add fast path for when component has no prop
This commit is contained in:
committed by
Sam Degueldre
parent
d046913a01
commit
55ac43c1db
+7
-2
@@ -118,7 +118,8 @@ export class App<
|
||||
name: string | null,
|
||||
isStatic: boolean,
|
||||
hasSlotsProp: boolean,
|
||||
hasDynamicPropList: boolean
|
||||
hasDynamicPropList: boolean,
|
||||
hasNoProp: boolean
|
||||
) {
|
||||
const isDynamic = !isStatic;
|
||||
function _arePropsDifferent(props1: Props, props2: Props): boolean {
|
||||
@@ -129,7 +130,11 @@ export class App<
|
||||
}
|
||||
return hasDynamicPropList && Object.keys(props1).length !== Object.keys(props2).length;
|
||||
}
|
||||
const arePropsDifferent = hasSlotsProp ? () => true : _arePropsDifferent;
|
||||
const arePropsDifferent = hasSlotsProp
|
||||
? (_1: any, _2: any) => true
|
||||
: hasNoProp
|
||||
? (_1: any, _2: any) => false
|
||||
: _arePropsDifferent;
|
||||
const updateAndRender = ComponentNode.prototype.updateAndRender;
|
||||
const initiateRender = ComponentNode.prototype.initiateRender;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user