Also, it is a really good idea to split up the search. You should create a path planner and everything that needs to find a path sends the information to it. The path planner will search only X tiles every frame, for every path needed. When a solution is found, or none, it will send a message to the entity requesting the path.