GroupBy taking time After lookup Aggregation pipeline

Hi Team,

i am running aggregation pipelines ,it’s looks good and fetching data very fast within seconds but while using lookup to match data from another collection the results also very quick .

when doing groupBy after lookup it’s take 14 seconds jus for 9k records.

is there any solution for it ?

i have tried many approach but did not success .