From: Chris S. <cr...@bi...> - 2002-02-21 17:39:06
|
Joe Pellegrino wrote: > > I've been looking at the source for BZ and playing around a bit. I was > wondering if someone could tell me something about XQueryPointer which > is eventually called with 'doMessage()' in playing.cxx Anyhow, just > out of curiosity I was profiling some of the code and this call takes > a significant amount of time. yeah, i thought i had a comment somewhere in the code to the effect that the event loop should cache the mouse position to avoid a round trip to the X server to query it. > What seems odd though is that I get two > different measurements from two different copies of the source. Each > copy is 1.7e2 perhaps downloaded at different times. One version requires > around 0.02xx seconds while the other 0.008 - 0.01 Was there some > sort of way to control the mouse polling time? there's no way to control the polling time because it's simply a request to the server. however, that could explain the difference. if there are other requests or responses pending then these will consume some time, so unrelated code may affect the time. in any case, the mouse position should be cached by the event loop and all calls requiring X server round trips should be avoided. did profiling show anything else interesting? cheers, -chris |