-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDClient rework #623
base: main
Are you sure you want to change the base?
CDClient rework #623
Conversation
Utilizes `boost::interprocess` to share a map between worlds. The master server loads the table into memory, and the worlds hook into it when they want to get an entry. This solves the issue of skill delay, but introduces the third-party library Boost. There should be a conversation about the introduction of Boost — it is a large library and adds extra steps to the installation.
I don't personally believe that adding a library as large as boost is worth it for saving 18mb per world server. Other options should be investigated first in my opinion. |
Load the context at start in readonly mode instead of fetching for every entry.
I don't want to add boost either but this is a pretty significant memory save... Are there any other similar cross platform IPC libraries? You could also just use pipes but that could get a bit sketchy. |
This method doesn't utilize pipes, it uses shared memory, the sh & mmap set of functions for Unix. Win32 also has a solution for it, but different API. That are some wrappers for these os dependent functions like this one here, but would leave us with a lot of work. Boost comes with ready custom allocators and other utility, likely more optimized than anything we'd come up with. |
There is now an option to utilize shared memory for some CDClient tables by adding `CD_PROVIDER_MEMORY=1` to the CMakeVariables.txt file. Allows masterconfig.ini to specify another run command for the world server, to allow for easier debugging through `valgrind`.
Utilizes
boost::interprocess
to share maps between worlds.The master server loads the tables into memory, and the worlds hook into it when they want to get an entry.
This solves the issue of skill delay and saves memory, but introduces the third-party library Boost.
There should be a conversation about the introduction of Boost — it is a large library and adds extra steps to the installation. Other options should be considered.