Mev/finder cause rendering to block

Hello,
I’ve just noticed that I’m experiencing a slowdown due to the tracker, since the update of @medv/finder to version 4.0.2. The time it takes to retrieve the selector is, in some cases, very long, which block rendering. That wasn’t the case with version 3.0.2.

Is there a reason why the listener on click is a blocking function? Or is it possible to set it to non-blocking to avoid this delay?

Can you submit an issue to author directly? In the meantime you can force lower dependency for tracker or turn of classname generation (won’t affect replays, clicks will be recorded without selector and in search/dashboards click filter will use labels instead then)

You can also try changing the options for selector generation itself:

/** minimum length of an optimized selector.
   *
   * body > div > div > p => body > p for example
   *
   * default 2
   * */
  minSelectorDepth?: number
  /** how many selectors to try before falling back to nth-child selectors
   * performance expensive operation
   *
   * default 1000
   * */
  nthThreshold?: number
  /**
   * how many tries to optimise and shorten the selector
   *
   * default 10_000
   * */
  maxOptimiseTries?: number
  /**
   * how many ticks to wait before capturing mouse position
   * (can affect performance)
   * 1 tick = 30ms
   * default 7
   * */
  trackingOffset?: number

Lowering the value of maxOptimiseTries should definitely help.