Page 1 of 1

"Logging into zone server" -- forever

Posted: Sat Jan 21, 2012 12:25 pm
by John Adams
Scat, by mistakenly adding some extra MISC__TODO loggers into the code, I stumbled upon the place where the client seems to freeze for up to 2 minutes while "logging into zone server" takes place. The world is actually doing something, but WHAT? I would like some help soon in discovering why this behavior is necessary, and if we can optimize the code a little.

Attached is the log of my session, not where you see a bazillion CalulateBonus, literally thousands of times while you enter game or /zone

Code: Select all

11:21:27 M TODO: Calculate via current spells
	(..\..\source\WorldServer\Entity.cpp, function: Entity::CalculateBonuses, line #: 484)
Then soon as that spammy loop is done, another one starts -- but at this point, "Logging into zone server" changes to "Loading entities" and the counter rises.

Code: Select all

11:47:42 M TODO: Is this a TODO, or just a statement of fact?
11:47:42 M TODO: Copy spawn to prevent issues with other client threads
	(..\..\source\WorldServer\zoneserver.cpp, function: ZoneServer::CustomizeSpawn, line #: 2084)
Can we check this out? Might be something in there that's wrong, poorly coded, or no longer needed. I remember logging into world got much slower _one day_ years ago, so it was something we added likely (we meaning, LE perhaps ;))

Re: "Logging into zone server" -- forever

Posted: Sat Jan 21, 2012 12:33 pm
by John Adams
Here's the few places I see this getting spammed -

client.cpp(2615): GetPlayer()->CalculateBonuses(); in void Client::ChangeLevel(int16 old_level, int16 new_level)
  • Not likely on a loop because I never see it otherwise
npc.cpp(89): CalculateBonuses(); in NPC::NPC(NPC* old_npc)
  • I think this is our culprit
player.cpp(234): player->CalculateBonuses(); in PacketStruct* PlayerInfo::serialize2(int16 version)
  • Not likely on a loop because I never see it otherwise
player.cpp(488): player->CalculateBonuses(); in EQ2Packet* PlayerInfo::serialize(int16 version)
  • Not likely on a loop because I never see it otherwise