RankSentinel

RankSentinel

151k Downloads

Move CLEU to it's own frame handler

orionshock opened this issue ยท 3 comments

commented

Can you move CLEU to it's own frame and event handler. I did this to my local copy and it improved my frame rate by at least 20.

    local frame = CreateFrame("Frame")
    frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
    frame:SetScript("OnEvent", function() addon:COMBAT_LOG_EVENT_UNFILTERED() end)

is all you need in the OnEnable()

commented

Not sure I understand that reasoning.

Aside from using native frames instead of AceEvent wrapper, there shouldn't be a difference.

commented

Brought this up with another dev, he traced it down to

  • it's not AceEvent it's CBH
  • 2x next() calls, 1x xpcall

Thanks for bringing this to my/our attention, I'll make the optimization today

commented

Also your CLEU handling needs optimization.
With out the addon loaded, I can get ~75fps in Dalaran. With it turned on I'm at ~35fps.

The order of operations inside CLEU should bail as early as possible so that it's not doing a lot of useless checks before realizing the player is idle out of group.

CLEU is a very very chatty event and it shouldn't be causing such a FPS loss.