I've been seeing very slow performance in an addon I am currently developing. I have tracked down the major slowdown to needing to iterate layers a lot.
While testing, I added a simple forEach iteration for layers just to see if the iteration or the code action for layers was the problem. And t...