# How to Optimize Pathfinding for Large Populations in Stonehearth Mods?

**URL:** <https://discourse.stonehearth.net/t/how-to-optimize-pathfinding-for-large-populations-in-stonehearth-mods/44230>\
**Category:** Development\
**Created:** [August 12, 2025, 5:04am UTC](https://discourse.stonehearth.net/t/how-to-optimize-pathfinding-for-large-populations-in-stonehearth-mods/44230 "2025-08-12T05:04:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fopodon](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@fopodon](https://discourse.stonehearth.net/u/fopodon)\
**Post date:** [August 12, 2025, 5:04am UTC](https://discourse.stonehearth.net/t/how-to-optimize-pathfinding-for-large-populations-in-stonehearth-mods/44230/1 "2025-08-12T05:04:47Z")

</div>

Hello

I have been experimenting with a mod that increases the population cap in Stonehearth and one big challenge I am running into is pathfinding performance. 😇 Once I have a lot of citizens & animals moving around; the game starts to slow down noticeably, especially when they are navigating complex terrain with multiple levels, ladders & narrow paths. I am wondering if there are ways to make pathfinding more efficient for large populations.🙃

I understand that Stonehearth already uses optimizations like caching and A\* pathfinding; but I am curious if there are modding techniques / settings that can reduce CPU load without breaking AI behavior. 🙂 For eg; is it possible to adjust update frequency for idle units, simplify collision maps / set priority zones for movement?🤔 This could help maintain smooth gameplay even in busy towns.

I would like to hear from other modders or developers who have tried scaling up the population and found ways to keep performance stable.🙂 Checked [Step by Step Guide to Modding in Stonehearth](https://discourse.stonehearth.net/t/step-by-step-guide-to-modding-in-stonehearth/38250) guide for reference. While researching optimization; I came across [what is a DevOps Engineer](https://www.igmguru.com/blog/devops-engineer) and realized that some of their workflow & performance-tuning practices might also help in managing pathfinding efficiency in Stonehearth.😇

If there’s a guide or documentation that explains how Stonehearth’s pathfinding system works internally, that would be a huge help for figuring out where to optimize.🤔

Thank you !!

---

<div class="post-metadata">

**Author:** ![BrunoSupremo](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/brunosupremo/32/54819_2.png) [@BrunoSupremo](https://discourse.stonehearth.net/u/BrunoSupremo)\
**Post date:** [August 12, 2025, 11:56am UTC](https://discourse.stonehearth.net/t/how-to-optimize-pathfinding-for-large-populations-in-stonehearth-mods/44230/2 "2025-08-12T11:56:07Z")

</div>

Wow. Right at the first line we can see this post is wrong. You faked a post (looks like a.i. too) just to insert your blog link in there?
