Currently, you cannot know which hooks CLuaGamemode::Call, CLuaGamemode::CallWithArgs and CLuaGamemode::CallFinish call which should be changed.
They should include the hook name in Vprof which would allow one to make it far easier to find any performance issues.
This should be relatively easy to implement and it would be really useful.
Example implementation for CLuaGamemode::CallFinish(same for other functions):
std::map<int, std::string> CallFinishStrs; // We need to save the std::string, because if it gets deleted VProf gets empty or garbage entries
void CLuaGamemode::CallFinish(int pool)
{
if (CallFinishStrs.find(pool) == CallFinishStrs.end())
{
std::string vprof = gLUA->GetPooledString(pool);
vprof = "CLuaGamemode::CallFinish (" + vprof + ")";
CallFinishStrs[pool] = vprof;
}
VPROF_BUDGET( CallFinishStrs[pool].c_str(), "GMOD" );
[...]
}
Details
Currently, you cannot know which hooks
CLuaGamemode::Call
,CLuaGamemode::CallWithArgs
andCLuaGamemode::CallFinish
call which should be changed.They should include the hook name in Vprof which would allow one to make it far easier to find any performance issues.
This should be relatively easy to implement and it would be really useful.
Example implementation for
CLuaGamemode::CallFinish
(same for other functions):