View Single Post
09/14/15, 04:03 PM   #7
zgwortz
Join Date: Jun 2015
Posts: 23
Heh. I'm actually running a pretty slow machine right now and doing just that kind of browsing at startup, and no, it doesn't come close to crashing. I actually don't notice the extra time it takes, which isn't all that surprising since when you think about it -- there aren't thousands and thousands of recipes - there are only a bit over 500 of them currently. Even at the relatively slow speed Lua runs, it's still a pretty short loop.

And using a table doesn't even save you anything time wise - pretty much all of these are scanning every single recipe in their list to find out if the player knows it from the start. Doing so from the indices using GetRecipeInfo() is actually quite likely to be faster than doing so from IsItemLinkRecipeKnown() because in the latter case it has to parse the item link string, whereas in the first case it's more likely going directly to it's internal recipe tables. (Best educated guess, in fact, is that the latter function internally turns the recipe link into the indices, and then uses an equivalent to GetRecipeInfo() to do it's work…)

So no, the excuse that it saves processing doesn't wash one bit. Nor am I implying that they "sucked at developing" -- they simply had a different design requirement than I do. Yes, I could base it on a table like CookeryWiz or ESO Master Recipe List, but that isn't my design goal.