Originally Posted by Phanx
Since the list of addons cannot change during a session, you should just create a static name->index table, and use a simple table lookup to get the index for the requested name, instead of calling a function that loops over all addons and calls more functions every time.
|
Yeah, you're right. Though about it, but I never seen anyone checking an addon information on performant critical situations (just checking if it is enabled to react accordingly, for example), so I did not worry about it. But caching the indexes certainly scales better. I'll change it.