This warning may display even if developer options are not set.
I am using the Google Nexus and, with the 4.2 update, the Developer options disappeared and had to be specifically enabled but even before I did that, ccassionally some program on my phone that usually runs normally would cause this red border to flash on for a few seconds - presumably the phone has something running that slows it down for a few seconds, resulting in the border flashing.
Since this is an indicator for developers that an operation slows down the main thread, maybe the thing to do is to look at the program and see what might be causing the slowdown (don't treat it as a system bug, treat it as a program warning).