• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ tfs 1.3 this source code using 14% my cpu

roriscrave

Advanced OT User
Joined
Dec 7, 2011
Messages
1,210
Solutions
35
Reaction score
206
I identified that this function is using 14% of my CPU.
what is this function? is it possible to decrease this cpu usage?

of all C ++ code, it accounts for 28%. Which in the end refers to 14% of cpu use.
LUA:
C++ Usage        CPU Usage Function:
28.95562%       12.73787% functor
C++:
void OutputMessagePool::scheduleSendAll()
{
    auto functor = std::bind(&OutputMessagePool::sendAll, this);
    g_scheduler.addEvent(createSchedulerTask(OUTPUTMESSAGE_AUTOSEND_DELAY.count(), functor));
}
 
This is the outbound network message emitter.

TFS is a gameworld network service daemon.

Are we surprised a network daemon spends a lot of its time sending packets? 🤔
 
This is the outbound network message emitter.

TFS is a gameworld network service daemon.

Are we surprised a network daemon spends a lot of its time sending packets? 🤔
I do not know the reason.
players use elfbot to perform extremely fast functions, can be it?
exemple: player put in elfbot
LUA:
auto 1 say 'exori vis'
and each 0.001 sec player will say 'exori vis', its some one exemple
 
I do not know the reason.
players use elfbot to perform extremely fast functions, can be it?
Yes, it can be that's why the max allowed packets per second should be as small as possible, this function not only send packets to player it encrypts them too. Even with the auto-vectorized xtea code it still has much work to do on cpu side.
 
Back
Top