Our app is getting quite complex now, and if I look at the network requests the app is making there are a bunch of requests to /elasticsearch/search and /elasticsearch/msearch. Some of the responses are quite big, and contain a lot of data that is not needed for the page.
I thought I could find the source of these by looking at the objects loaded in debug_mode, but it appears the searches are done before the debugger runs. There are thousands of workflow items and elements in the app so it’s hard to figure out what is causing the searches.
Is there any way to debug this or find out which elements are responsible for triggering which queries (or anything like that)?