I presume that since OnGUI() is called every frame, that all its buttons and textures are being completely re-rendered onto the video card on top of themselves each time. (Indeed I tested this by drawing something with OnGUI outside of any camera area on the screen for only a few ticks, then when I stopped drawing it, it disappeared). The first part of my question is: is this accurate? If not, you can disregard the next paragraph.
If so, isn’t there a way to optimize this? Sure, if the buttons are overlayed over your camera’s viewport rect or something else that’s going to re-draw every frame, then you’d need to keep drawing the buttons over that. But in the case where you have, say, a dedicated “control panel” area of the screen where only GUI elements are drawn, you would only need to render that part of the screen once at the beginning, and then update it only when the mouse is moved into that area, restoring the part that was occluded by the cursor and activating the controls’ onHover(), etc. I wouldn’t imagine that major RTSs like WarCraft, who have static buttons in the HUD along the bottom, keep re-drawing all of them every frame. So if this isn’t already being done at a low level by the GUI system, is there a way to first tell Unity not to clear a certain area of the screen each update, and further, to use GUI tools to only draw there conditionally?