SavedInstances

SavedInstances

13M Downloads

RequestRaidInfo(), RequestLFDPlayerLockInfo() makes stuttering when SI enabled.

zzipsa22 opened this issue ยท 5 comments

commented

Describe the bug

Do you have an error log of what happened?

To Reproduce

Screenshots

Did you try having SavedInstances as the only enabled addon and everything else (especially something like ElvUI) disabled?
YES

Which version of SavedInstances are you using?
9.0.2

Was it working in a previous version? If yes, which was the last good one?
didn't checked yet.

Additional context

I've been using SI for a long time.

First of all, I thank you for maintaining this great addon!

From someday, I experienced micro stuttering when I first enter world or combat-end (especially in Dungeon).
I found SI cause this problem like other users commented below. 
I checked some, and I'm not for sure, but it seems RequestRaidInfo() and RequestLFDPlayerLockInfo() makes stuttering for some character (not all)
and I know these are built-in API that not SI made. I don't know why this happen.

When I manually run RequestRaidInfo(), then it occurs stuttering after 2~3 seconds.
Both APIs are OK without SI. it only makes stuttering with SI enabled.

It seems this is also related combat end stuttering, but I don't know this well.

maybe DBM:EndCombat-->BossModEncounterEnd-->RefreshLockInfo()-->RequestLockInfo()-->RequestRaidInfo() ?

Sorry for my english. This is my best what I can express.

I hope this would help. Thanks again for your effort!

-- I leave this here, because curseforge comment function gets errors now..

commented

So it is cause by C_QuestLog.GetAllCompletedQuestIDs? And also related to #425

commented

It seems not. 'questcomplete' does something after that line. I don't know what cause this.
when I manually run C_QuestLog.GetAllCompletedQuestIDs() with SI enabled, then stuttering is not occurred.

line 2957~2975
for _,einfo in pairs(SI.WorldBosses) do
if weeklyreset and (
(einfo.quest and IsQuestFlaggedCompleted(einfo.quest)) or
(questcomplete and einfo.quest and tContains(questcomplete, einfo.quest)) or <--- this,
wbsave[einfo.savename or einfo.name]
) then
local truename = einfo.name
local instance = SI.db.Instances[truename]
instance[SI.thisToon] = instance[SI.thisToon] or temp[truename] or { }
local info = instance[SI.thisToon][2] or {}
wipe(info)
instance[SI.thisToon][2] = info
info.Expires = weeklyreset
info.ID = -1
info[1] = true
end
end

SI:QuestRefresh(recoverdaily, questcomplete, nextreset, weeklyreset) <--- and this.

Wrapping both with --[[, ]] then not occurred.
Wrapping only one of them then still occurred.

commented

Both uses tContains to check if a specific quest is in the table, but the table is HUGE. Before SL, the table returned by GetAllCompletedQuestIDs used questID as key, and now returns in a sorted array. I think it is cause by iterating such a huge table. Maybe dropping C_QuestLog.GetAllCompletedQuestIDs usage is fine, since IsQuestFlaggedCompleted can do the job.

commented

I hope that would work. ( I barely understand what is what :D )
Thanks for quick replies. You are the best!

commented

It seems SI:Refresh() fired by "UPDATE_INSTANCE_INFO" from RequestRaidInfo() makes stuttering.

++
Core.lua Line 2948,
local questcomplete = C_QuestLog.GetAllCompletedQuestIDs()
When I add "--" front of that line, then stuttering is not occurred.