In general, you could get around the performance issue by calculating the distance to each tree from the mill and storing the closest mill / distance, then calculating the same each time a mill gets placed. Doing this with an R-Tree would be fairly cheap too!
Hey, nice suggestion, this is actually already in place! Every mill has a list of all trees around it by distance, and workers use it to find their next tree.
But after their bags are full, they run a radius search to find the nearest mill, and that can still have edge cases of finding a mill across the terrain, and a closer one by walking distance is ignored because it was outside the search radius.