Re: [osg-users] High event times
Hi Robert, On Tuesday, November 03, 2015 09:34:36 Robert Osfield wrote: > It might be sufficient for us to just toggle on the resize check when the > configure event arrives. If you've added this already then just send the > changes to me and I'll do review and have a bash at retracing my steps back > in the Spring when I was resolving the original bug. I have only disabled this completely here, but I will provide an appropriate patch probably tomorrow evening. Looking at the svn log, you have reworked the cameras resize mechanisms to handle attachments and the viewport - which is good to have - Thanks! It looks like the patch I mentioned was something that you started with. That's about what I can tell from the logs. Sorry I did not follow too close lately ... I will provide a change in the end. Thanks Mathias___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High event times
Hi Matthias, It might be sufficient for us to just toggle on the resize check when the configure event arrives. If you've added this already then just send the changes to me and I'll do review and have a bash at retracing my steps back in the Spring when I was resolving the original bug. Robert. On 2 November 2015 at 18:44, Mathias Fröhlich wrote: > > > Hi Robert, > > > > On Saturday, October 31, 2015 18:02:24 Robert Osfield wrote: > > > I have had a look at the revision and vaguely remember hunting double a > > > long time troublesome bug, but can't recall the details of the recreating > > > the bug off hand. I'd have to look up what stuff I was doing around March > > > this year. The r14805 commit message was "Fixed resize dimensions of X11 > > > window". > > > > > > At a guess, perhaps we can just do this check when we suspect a resize. > > That is what I expect too. If this is required at all. Sadly I do not know > exactly what > > type of event is guaranteed to arrive. > > > > > What are the event times you are seeing? What platform are you testing > on? > > Fedora 22 x86_64. I now looked up the implementation in libX11 and it > seems to > > introduce 3 round trips in total to the X server. That results in > 0.6ms-0.8ms > > down to <= 0.2ms using the event visitor that just gets switched off > completely > > by setting it to no traversal mode. That does not sound too much time, but > if you > > want to squeeze the last out of your application you do not want to have a > > single round trip if it is not needed. > > > > Also, if you think about the 80Hz frame rate with an oculus for example, > this > > round trip time difference of about 0.5ms turns already in > 0.0005/(1/80)=0.04 > > that is 4% reduced available cull time (or draw time) to hit the target > frame > > rate - without having drawn a single pixel. And having a round trip here > makes > > you much more prone to scheduling decisions in the system as the X server > needs > > to be started up to to answer your request which makes these times much > more > > jittery and increases the probability of a missed frame. > > > > Greetings > > > > Mathias > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High event times
Hi Robert, On Saturday, October 31, 2015 18:02:24 Robert Osfield wrote: > I have had a look at the revision and vaguely remember hunting double a > long time troublesome bug, but can't recall the details of the recreating > the bug off hand. I'd have to look up what stuff I was doing around March > this year. The r14805 commit message was "Fixed resize dimensions of X11 > window". > > At a guess, perhaps we can just do this check when we suspect a resize. That is what I expect too. If this is required at all. Sadly I do not know exactly what type of event is guaranteed to arrive. > What are the event times you are seeing? What platform are you testing on? Fedora 22 x86_64. I now looked up the implementation in libX11 and it seems to introduce 3 round trips in total to the X server. That results in 0.6ms-0.8ms down to <= 0.2ms using the event visitor that just gets switched off completely by setting it to no traversal mode. That does not sound too much time, but if you want to squeeze the last out of your application you do not want to have a single round trip if it is not needed. Also, if you think about the 80Hz frame rate with an oculus for example, this round trip time difference of about 0.5ms turns already in 0.0005/(1/80)=0.04 that is 4% reduced available cull time (or draw time) to hit the target frame rate - without having drawn a single pixel. And having a round trip here makes you much more prone to scheduling decisions in the system as the X server needs to be started up to to answer your request which makes these times much more jittery and increases the probability of a missed frame. Greetings Mathias___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High event times
Hi, Mathias and Robert! Just checked this. On i7 laptop with nvidia 965m under Lubuntu 15.04 with 352.30 drivers I've got numbers without patch eventtime=0.17ms with patch 0.09ms But I've add folowing if (_traits->windowDecoration) to above code So I think that if user create window without decoration that means that he don't want to resize or move window at all. Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65507#65507 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] High event times
Hi Mathias, I have had a look at the revision and vaguely remember hunting double a long time troublesome bug, but can't recall the details of the recreating the bug off hand. I'd have to look up what stuff I was doing around March this year. The r14805 commit message was "Fixed resize dimensions of X11 window". At a guess, perhaps we can just do this check when we suspect a resize. What are the event times you are seeing? What platform are you testing on? Robert. On 31 October 2015 at 16:28, Mathias Fröhlich wrote: > > > Hi Robert, > > > > I am currently tracking higher than expected event times as displayed > > in the stats HUD with an application of mine. > > It turns out that we gained one or more round trips to the X server > > with change 14805. There is a call to XGetWindowAttributes and > XTranslateCoordinates > > introduced unconditionally on each frame. > > > > Do you remember what problem is solved with this part of new code? > > > > I just did a quick test here by just disabling the new code lines roughly > at > > line GraphicsWindowX11.cpp:1555. Removing these 4 lines did not change > anything > > in the behavior of my application with respect to resizing/moving/? so far. > > Well, except that removing this did bring back the short event times that > > I had before. > > > > I wonder if this is really required? > > At least if this is required unconditionally on each frame? > > May be we can reduce execution of this two calls to the case > > when a ConfigureNoify event is received before? > > > > Thanks > > > > Mathias > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] High event times
Hi Robert, I am currently tracking higher than expected event times as displayed in the stats HUD with an application of mine. It turns out that we gained one or more round trips to the X server with change 14805. There is a call to XGetWindowAttributes and XTranslateCoordinates introduced unconditionally on each frame. Do you remember what problem is solved with this part of new code? I just did a quick test here by just disabling the new code lines roughly at line GraphicsWindowX11.cpp:1555. Removing these 4 lines did not change anything in the behavior of my application with respect to resizing/moving/? so far. Well, except that removing this did bring back the short event times that I had before. I wonder if this is really required? At least if this is required unconditionally on each frame? May be we can reduce execution of this two calls to the case when a ConfigureNoify event is received before? Thanks Mathias ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org