Best way to look for immutable fields: database or lua environment?
Posted: Sat May 02, 2020 3:35 pm
Hi Tony,
I'm wondering what's the best choice to access the field of an item (or actor...), in terms of performances. I'm talking about a value that never changes (which is immutable, always the same between the database and the Lua environment). Is it better to look for the value in the database or the Lua environment? Or in other words:
DialogueManager.masterDatabase.GetItem(id).AssignedField("title").value;
or
DialogueSystem.DialogueLua.GetItemField("item", "field");
Best regards,
Marc
I'm wondering what's the best choice to access the field of an item (or actor...), in terms of performances. I'm talking about a value that never changes (which is immutable, always the same between the database and the Lua environment). Is it better to look for the value in the database or the Lua environment? Or in other words:
DialogueManager.masterDatabase.GetItem(id).AssignedField("title").value;
or
DialogueSystem.DialogueLua.GetItemField("item", "field");
Best regards,
Marc