Hey,
when initializing a player (EntityPlayer) a new random-spawn position inside the world-spawn-area will be determined. To do this world.q(...) will be called causing chunks inside the spawn-area to be loaded. As a EntityPlayer Object will be created on each login-request (even if not successful) this happens very often.
It does not matter if the player has been on the server before. The code in the consctructor will be called before updating with the saved playerinformation
Comments 4
As far as i can tell from a heap-dump this is not the case. In 1.9.2 there are no ase.java (Chunk) classes loaded if no player is connected.
Assuming the spawn-area is always loaded this would mean there area different problems in my opinion:
1. The Server will keep chunks loaded event if no player is online. This can result in unnecessary data loss on hard shutdowns.
2. Using the worldborder will not prevent certain parts of the world to still be active.
3. There is an unnecessary amount of memory constantly being used. Which would be useful to get rid of (specifically if talking about cloud services like realms).
Aren't the spawn chunks always loaded, regardless of this? Or is there something else you're pointing out?