Quoted from ngabbs tid 42399961 posted by [老李三鹿李]
Blizzard official UI code in wow-ui-source/Interface/AddOns/Blizzard_Communities/GuildNews.lua
function CommunitiesGuildNewsFrame_OnEvent(self, event)
if event == "PLAYER_ENTERING_WORLD" then
QueryGuildNews();
else
if ( self:IsShown() ) then
CommunitiesGuildNews_Update(self);
end
end
end
This QueryGuildNews() posts the event GUILD_NEWS_UPDATE
for thousands of times every time you enter the world or switch zones, depending on the size of your guild. During this time, your games processes up to 140 million guild news.
It reminds me of the bug in GTA V that loads the user profile json for 1984531500 times when opening the game.
That’s probably why many people get lags since TWW.
How to fix:
You may create a custom addon with such code:
--source: ngabbs.com/read.php?&tid=42399961
local BLZCommunitiesGuildNewsFrame_OnEvent = CommunitiesGuildNewsFrame_OnEvent
local newsRequireUpdate, newsTimer
CommunitiesFrameGuildDetailsFrameNews:SetScript("OnEvent", function(frame, event)
if event == "GUILD_NEWS_UPDATE" then
if newsTimer then
newsRequireUpdate = true
else
BLZCommunitiesGuildNewsFrame_OnEvent(frame, event)
-- Update guild news only for once 1 sec after entering world.
newsTimer = C_Timer.NewTimer(1, function()
if newsRequireUpdate then
BLZCommunitiesGuildNewsFrame_OnEvent(frame, event)
end
newsTimer = nil
end)
end
else
BLZCommunitiesGuildNewsFrame_OnEvent(frame, event)
end
end)
… or wait for Blizzard to fix it.