newserv icon indicating copy to clipboard operation
newserv copied to clipboard

Caching patch server file metadata serverside

Open patapancakes opened this issue 3 years ago • 3 comments

As of right now it seems that every time newserv starts it needs to reprocess the entire patch server data directory (which usually hasn't changed), making it take around a minute for the server to start. It would be great if it could cache the contents of the folder so startup doesn't take as long on subsequent runs.

patapancakes avatar Sep 04 '22 04:09 patapancakes

Are you using the latest version of phosg? I updated phosg's crc32 function today to make it quite a bit faster for exactly this reason. I also considered implementing a metadata cache in newserv; if it's still too slow to start with the latest phosg version, let me know on this ticket and I'll figure out some solution.

fuzziqersoftware avatar Sep 04 '22 05:09 fuzziqersoftware

I'm using the latest version of it, yes. The problem is most likely a weak processor as I'm currently running newserv on a VPS.

patapancakes avatar Sep 04 '22 05:09 patapancakes

I've added a checksum cache which hopefully will make startup faster (after the first time). Beware, though: this adds a new potential source of bugs since patch files now may not be loaded until they're actually needed by a patch client. So, it's now inadvisable to modify the patch files while the server is running.

fuzziqersoftware avatar Sep 04 '22 06:09 fuzziqersoftware