You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an extremely inneficient way to check if a constant is defined.
`Object.constants.size` is `135` in a raw irb session.
On our large app, not even eager loaded it's `4521`. I didn't bother to
check in production, but it's probably several times that.
So here we're both allocating a very large array, and doing a `O(n)`
search into it.
0 commit comments