Hey all
I'm working on patch that displays a lot (30 lines, 76 chars per line) of text in a Gem window using [text2d]. I observed that CPU usage increases proportional to the string length sent to [text2d]. It appears to me that [text2d] renders the given string for each frame. The fact that frame rate and CPU usage are proportional, too, confirms this assumption.
Now, I'd like to make my patch less CPU hungry and thought about switching to single buffer mode, since it would be sufficient to update the gemwin only when the text changes, which is far less often than running gemwin at any fixed frame rate. Now my real problem begins. Whenever the text/string changes, I clear the buffer, send the string to [text2d] and bang the [gemhead], so that the display is refreshed (in this exact order). However, when I perform this steps in zero logical time, I get a blank screen. Only when I delay the bang to [gemhead] by a few milliseconds, I get text in the gemwin.
I just noticed now that this is not related to [text2d] at all, but seems an issue between [gemwin] and [gemhead]. [gemhead] can't render a certain amount of time after [gemwin] has been cleared. Is there a way to know when [gemhead] is ready to render (or when [gemwin] has finished clearing)?
Roman