-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Package + Version
-
@sentry/browser
Version:
5.4.1
Description
I currently investigate why our page is slow and found a lot of clearTimeout
, setTimeout
calls.
There is some pretty weired behavior regarding @sentry/browser and I'm not really sure if this is supposed to be:
Reproduction, just go on any page that has @sentry/browser
installed and type in the console:
debugger; document.body.addEventListener('click', () => 1)
Then watch in the debugger what sentry does. It invokes the breadcrumbEventHandler
in
And then immediately invokes it with the element itself:
This doesn't seem right? Shouldn't this method be called on click and not immediately?
On a page of ours we register ~120 click handler, so this methods debounce is constantly calling setTimeout/clearTimout (that is again shimmed by sentry itself + in our case zone.js/angular) so the call stack and overhead is kinda huge.