Re: Limitations with v2 port implementation
Peter Soetens <[email protected]> Thu, 9 Apr 2015 13:34:24 +0200
| Newsgroups | gmane.science.robotics.orocos.devel |
|---|---|
| Message-ID | <CAMYDobVVgvFQCvkQTwX=XfJ0FtQ74d+svYiipHB5KapjbX1ByQ@mail.gmail.com> |
--===============1262700211== Content-Type: multipart/alternative; boundary=001a113485c8c5a4980513490818 --001a113485c8c5a4980513490818 Content-Type: text/plain; charset=UTF-8 Op 9-apr.-2015 11:57 schreef "Janosch Machowinski" < [email protected]>: > > Hey, > there is another issue with the current port implementation, > it might be related. The current implementation always searches > all known connections in a linear way and returns the first one > that has a sample. That is not entirely correct. The search only happens when the current connection has no more data. This is indeed an extra penalty since each read on an empty port causes a search on all connections. This is bad for runtime issues, and (even if this > is more theoretical) bad in terms of starvation. What I mean is, > if the sample take a lot of time to be processed between read > calls, so that new samples arrive in between on the first connections, > the last connections will never be read. I think it already goes circular over the connections list ? > Perhaps adding some sort of clock hand algorithm helps here. > Greetings > Janosch Peter --001a113485c8c5a4980513490818 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_quote"><p dir=3D"ltr">Op 9-apr.-2015 1= 1:57 schreef "Janosch Machowinski" <<a href=3D"mailto:Janosch.= [email protected]" target=3D"_blank">[email protected]</a>>:= <span class=3D""><br> ><br> > Hey,<br> > there is another issue with the current port implementation,<br> > it might be related. The current implementation always searches<br> > all known connections in a linear way and returns the first one<br> > that has a sample.</span></p> <p dir=3D"ltr">That is not entirely correct.=C2=A0 The search only happens = when the current <br>connection has no more data. This is indeed an extra p= enalty since each <br>read on an empty port causes a search on all connecti= ons.</p><span class=3D""> <p dir=3D"ltr"> This is bad for runtime issues, and (even if this<br> > is more theoretical) bad in terms of starvation. What I mean is,<br> > if the sample take a lot of time to be processed between read<br> > calls, so that new samples arrive in between on the first connections,= <br> > the last connections will never be read.</p> </span><p dir=3D"ltr">I think it already goes circular over the connections= list ?</p><div class=3D"HOEnZb"><div class=3D"h5"> <p dir=3D"ltr">> Perhaps adding some sort of clock hand algorithm helps = here.<br> > Greetings<br> > =C2=A0 =C2=A0 =C2=A0Janosch</p> </div></div><span class=3D"HOEnZb"><font color=3D"#888888"><p dir=3D"ltr">P= eter<br> </p> </font></span></div><br></div> --001a113485c8c5a4980513490818-- --===============1262700211== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- Orocos-Dev mailing list [email protected] http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev --===============1262700211==--