Thread: API Changes
View Single Post
09-09-14, 10:30 AM   #37
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 196
Originally Posted by Phanx View Post
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.