There is only one way to find out - profile the search query with any online PHP profilers (tideways, newrelic, black fire etc).
It will show a callgraph like this one where you can easily spot the problem:
Profile Callgraph