peter Fodrek wrote:
Normally our load is less than 10%. I have been able to track the problem down to the actions following the window resize:I'm developing an application using the motif toolkit to display line traces in the manner of a multichannel osciloscope. This is a linux platform.The window draws a number of horizontal traces obtained from a data source. When we started using the xinerama extension or very large resolutions (> 1280x1024). We started observing an undesirable behavior: The application, when is resized, re-creates the pixmaps where the data is drawn. The old ones are freed and new ones are created according to the new size of the window. Then, the program continues operating by receiving new data periodically and drawing them.How you handle Expose Event... I was done similar task in Athena Widget set and via Xlib functions XDrawLine XDrawArc... I have 2 dynamicaly reziable arrays of structures(one for XDrawLine parameters and the other for XDrawArc parameters) and in Expose handler I just read clear graphical context and run 2 cycles for displaying arcs and lines... Window manager and as wel my application runs with priority -20, load is permanently about 70% for X (but I run another one task with priority -20). Reactions for keypress are delayed <2s on a Celeron @333Mhz based PC... High load is normal for any WIMP system...
After the drawing window is resized, all the old pixmaps are discarded, a big pixmap and a number of smaller pixmaps are re-created.
On each of the smaller pixmaps, the axis for a trace is drawn. Then, this pixmap is copied onto the big pixmap shifted, so the traces are stacked vertically. The smaller pixmaps are copied using XCopyArea(). Then, the main pixmap is painted on the screen.
As I described in my first email; sometimes, after resizing, the X server slows down and the traces are not displayed as fast as they should. If I disable the copying of the smaller pixmaps onto the big one, I don't get the problem. I'm pretty sure the problem is caused by copying the smaller pixmaps onto the larger one.
I'd really love to figure out what's going on, what causes the X server to shoot up to 97%? is this the symptom of a problem with the X server?
Any insights into this?
--
Rafael
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert
