Deep custom AngularJS Filter
I tried to improve it myself and it is much faster than before!
Here's my new code, feel free to comment on what can be further done to improve it.  

    .filter('searchProjects', ($rootScope, $filter) =&gt; {
        return (projects, query) =&gt; {
            if (projects) {
                //Create project leader search object
                let projectLeaders = {};
                $rootScope.profiles.forEach(profile =&gt; {
                    profile.projects.forEach(role =&gt; {
                        let projectRole = role.masterData['Projektrolle'];
                        //864 = Projectleader Tag ID
                        if (projectRole &amp;&amp; ~projectRole.indexOf(864)) {
                            let projectLeader = profile.firstName + " " + profile.lastName;
                            if (projectLeaders.hasOwnProperty(role.project)) {
                                projectLeaders[role.project].push(projectLeader);
                            } else {
                                projectLeaders[role.project] = [projectLeader];
                            }
                        }
                    });
                });

                return projects.filter(p =&gt; {
                    //delete customers' contacts to exclude from search
                    if (p.kunde &amp;&amp; p.kunde.contacts) {
                        //Only leave the selected Reference Contact in Customer's Contacts for Search
                        p.kunde.contacts = p.kunde.contacts.filter(contact =&gt; p.reference === contact.id);
                    }
                    //if project has leaders, add them to it for searching
                    if (projectLeaders.hasOwnProperty(p.id)) {
                        p["projectLeaders"] = projectLeaders[p.id];
                    }
                    return Boolean($filter('filter')([p], query).length);
                });
            }
        };
    })