Open Bug 1862717 Opened 2 years ago Updated 2 years ago

Lots of time spent in CallAddPropertyHook on Angular

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [sp3])

I see this showing up on a function like:

function attachPatchData(target, data) {
            isLView(data) ? (target.__ngContext__ = data[20], function registerLView(lView) {
                TRACKED_LVIEWS.set(lView[20], lView);
            }(data)) : target.__ngContext__ = data;
        }

CallAddPropertyHook comes from target.__ngContext__ = data[20].
target is sometimes a native JS object and sometimes a DOM object.

Firefox is 4.1x slower than Chrome on this particular function and making Firefox as fast as Chrome on this function would reduce its time by 0.5% on this test.

Firefox Profile
Chrome Profile

This pattern also shows up in 583/patchEventTarget/patchEventTargetMethods/makeAddListener/< where we're 2x as slow and is worth another 0.6%

Blocks: speedometer3
Whiteboard: [sp3]

This might be helped by bug 1844878.

Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.