Today, I worked on a service request that our customer is using one of our articles to obtain the deadlocks but the number the deadlocks generated is causing a delay of hours of the query execution that takes hours to complete.
Even if our customer tries to use filter is taking time because the deadlocks are saving internally in an extended event file, for this reason, before applying the filter SQL Enginee needs to read the entire content of the extended event file. For this reason, depending on the size of the extended event file it could take time.
We suggested two solutions to avoid this problem:
Create your own Extended Event to capture our deadlock explained in this article.
Use Diagnostic Setting of the database that you could capture from the internal telemetry data, data, like Error, timeouts, Blocks, Deadlocks, etc.. and saving it in a Log Analytics workspace or storage account.