--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
@@ -70,6 +_,7 @@
                             return false;
                         } else {
                             mutableLong.setValue(time + 20L + level.getRandom().nextInt(20));
+                            if (mob.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck // TODO Modifies Vanilla behavior, add config option
                             PoiManager poiManager = level.getPoiManager();
                             map.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time));
                             Predicate<BlockPos> predicate1 = pos -> {
@@ -83,12 +_,16 @@
                                     return true;
                                 }
                             };
-                            Set<Pair<Holder<PoiType>, BlockPos>> set = poiManager.findAllClosestFirstWithType(
-                                    acquirablePois, predicate1, mob.blockPosition(), 48, PoiManager.Occupancy.HAS_SPACE
-                                )
-                                .limit(5L)
-                                .filter(pair1 -> predicate.test(level, pair1.getSecond()))
-                                .collect(Collectors.toSet());
+                            // Paper start - optimise POI access
+                            final java.util.List<Pair<Holder<PoiType>, BlockPos>> poiposes = new java.util.ArrayList<>();
+                            io.papermc.paper.util.PoiAccess.findNearestPoiPositions(poiManager, acquirablePois, predicate1, mob.blockPosition(), 48, 48*48, PoiManager.Occupancy.HAS_SPACE, false, 5, poiposes);
+                            final Set<Pair<Holder<PoiType>, BlockPos>> set = new java.util.HashSet<>(poiposes.size());
+                            for (final Pair<Holder<PoiType>, BlockPos> poiPose : poiposes) {
+                                if (predicate.test(level, poiPose.getSecond())) {
+                                    set.add(poiPose);
+                                }
+                            }
+                            // Paper end - optimise POI access
                             Path path = findPathToPois(mob, set);
                             if (path != null && path.canReach()) {
                                 BlockPos target = path.getTarget();
