I've been trying to build a screen recorder to practice my atrophied Java skills (even though there are already way too many).
However, I've come upon the problem of the Robot class being ridiculously slow -- around maybe 15fps even on my i7 powered machine, and a crawling 4-5fps on my macbook. I've built a working recorder with Python and was able to at least reach a reliable 20-24fps by grabbing snapshots with PIL.
So, I'm curious, what is the technical reason for the class being so slow?
Further, how do other screen recorders work? Screencast-o-matic is Java, and seems to perform well. I assume that there is some way of connecting with the underlying OS, and ripping everything out of a buffer or something? I image that there has to be some ridiculously fast way to get copies of what's being drawn on the screen -- After all, the OS is fast enough to draw the screen multiple times after all while doing a kajillion other calculations! It seems copying an array of colors from one place to another should be a relatively cheap operation.
I'm determined not to give up! I just don't know what I need to know to really dive into the meat of building a proper recorder.