Skip to content

Commit b4f6998

Browse files
committed
chore: comment
1 parent 1f3a62c commit b4f6998

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/data/dom-events/dom-event.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ export class DOMEvent implements Event {
393393
// nanoseconds per dispatchTo() call.
394394
private handleEvent(data: EventData, isGlobal: boolean, phase: 0 | 1 | 2 | 3, removeEventListener: (eventName: string, callback?: any, thisArg?: any, capture?: boolean) => void, removeEventListenerContext: unknown) {
395395
// Set a listener to clone the array just before any mutations.
396+
//
397+
// Lazy-binding this (binding it just before being called, rather than
398+
// up-front) unexpectedly seems to slow things down - v8 may be
399+
// optimising it for us or something.
396400
this.listenersLive.onMutation = this.onCurrentListenersMutation.bind(this);
397401

398402
for (let i = this.listenersLazyCopy.length - 1; i >= 0; i--) {

0 commit comments

Comments
 (0)