-
Notifications
You must be signed in to change notification settings - Fork 3
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
Tips #1
Labels
Comments
Also i am curious, can someone explain why you are setting null character on Linux Builds ??? |
Sure this can be optimized. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just glanced over the code quickly, afew tips
Use DLL_PROCESS_ATTACH instead of doing an IF NULL check every time there is a callExtension.
https://github.com/EpochModTeam/EpochServer/blob/master/src/dllmain.cpp
Arma use of callExtension is a blocking call.
So we know that there will only be one thread at a time ever calling RVExtension.
Therefore you can optimize the callExtension by using allocating afew variables on the stack instead of allocating / deallocating on the heap all the time (in your callExtension function).
Basically stop allocating on the heap were you don't need to.
All the async threading is done by creating new threads & detaching them.
Creating Threads is overhead and costly, you should be re-using threads think worker thread pool.
There afew other things i saw, but the above are the main things.
The text was updated successfully, but these errors were encountered: