USB CameraServer causing high CPU usage on RoboRIO

A few FTAs in Canada have told me teams using Java, USB cameras, and the CameraServer automatic capture have been having issues.

I think I may have tracked down the problem. I was able to recreate very high CPU usage by just running the example code.

In the CameraServer class, there is a capture() method with a while loop that polls the camera for image data.

In this loop there is no Thread.sleep, so it will poll the camera as fast as the roboRIO can, thus using a lot of CPU time.

I added a Thread.sleep(15) to the end of the while loop. This wait amount is pretty arbitrary, as the max FPS we are trying to achieve is 30.

After making this modification, our CPU usage dropped dramatically, with no obvious loss in framerate to the camera feed.

Is it this bug?