This is v18/v19's fault. When a player connects, the server goes through every add-on you have enabled, and generates a file manifest and sends it to the player so that they can download it. If you have a few add-ons enabled, you almost don't notice it. If you have many add-ons enabled, you freeze for a bit. If you have very many add-ons enabled, you almost crash. A way to see this is that when people join, the last thing shown in console before the freeze is "Generating file manifest".
When people join, just wait until the game finished generating file manifest, or disable some add-ons when starting a server.
The file manifest is only regenerated when it is possible that the number of art files the server is using could have changed.
Events that will cause the manifest to be regenerated are:
- Creating a datablock
- Deleting a datablock
- Changing maps
Once the file manifest is regenerated, it will not have to be regenerated again until one of those events occurs.
If you have an add-on that is constantly creating new datablocks, then yes, the manifest will have to be regenerated whenever someone connects because those new datablocks could reference new art files that the connecting user needs. You should not be creating datablocks during gameplay.
Regenerating the file manifest consists of these operations
- Iterate over all datablocks and add relevant art files to manifest
- Iterate over mission group to find skybox, terrain, and interior files, add relevant art files to manifest
- Add all print textures to manifest
- Iterate over all files in the manifest and compare their file modified time with the time stored in the cache database. If the file has been modified since the last time it was stored in the database, then the file must be read, hashed and re-stored in the database.
This means that if none of your files have changed, regenerating the file manifest should only take a few seconds because most files are not read, only their modified time is checked. The first time you start a server, it may take longer than normal as none of the files are in the cache database yet, but it still won't take 5 minutes unless your hard disk is ruinously fragmented.
If your server freezes for more than a few seconds then there is something else wrong.