Description
LoggerConfig#callAppenders is performance sensitive since it is called for every LogEvent. Currently the AppenderControl objects are stored in a CopyOnWriteArraySet which is a very good fit for its intended use (vastly more reads than writes, writes may happen concurrently in different threads), but the disadvantage of this data structure is that it creates a new Iterator instance each time we need to traverse its contents.
We can do slightly better than this by storing the objects in an array and keep this array in an AtomicReference. The array can be traversed by index without allocating new objects.