TODO: Would QueryQuestSingle() be better than used GetQuest() ?
Laumesis opened this issue ยท 0 comments
Think / Test if QueryQuestSingle( )
would be more efficient than GetQuest( )
.
Currently these are used mixedly. Some places Query database, some Get/Generate quest object.
Examples, but in general whole codebase:
function QuestieDB:IsPreQuestGroupFulfilled(preQuestGroup)
:
Questie/Database/QuestieDB.lua
Line 458 in a778db0
function QuestieDB:IsPreQuestSingleFulfilled(preQuestSingle)
:
Questie/Database/QuestieDB.lua
Line 490 in a778db0
function QO:IsPreQuestSingleFulfilled()
:
Questie/Database/QuestieDB.lua
Line 919 in a778db0
function QO:IsPreQuestGroupFulfilled()
:
Questie/Database/QuestieDB.lua
Line 946 in a778db0
pros for QueryQuestSingle( )
:
Less quests cached in _QuestieDB.questCache[questId]
which can grow to huge?
Creating object to above cache is realitevely heavy?
pros for GetQuest( )
:
Quests get cached into _QuestieDB.questCache[questId]
where from getting the data is faster than querying & decompressing from database.