[mythtv] Possible errors

Joseph A. Caputo jcaputo1 at comcast.net
Fri Oct 8 20:13:57 UTC 2004


On Friday 08 October 2004 14:23, Isaac Richards wrote:
> On Friday 08 October 2004 01:58 pm, marty.boeckman at comcast.net wrote:
> > The code below has a note about being slow. It could be fixed by
> > putting a break statement in the loop whenever the boolean is set
> > to false.  Because once the boolean is set to false, that's all
> > this method can ever return. I found this potential issue using a
> > case tools audit feature. The results of the audit are posted at:
> > http://home.comcast.net/~marty.boeckman/audit.txt
>
> The main issue with it being slow is the use of at(), which iterates
> linearly through the list for each item.  Fixing that would bring
> about a much better fix than simply breaking out of the loop.
>
> Isaac

Exactly.  What it needs is an iterator.  How 'bout this?  It's untested, 
but it's pretty straightforward.

-JAC
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generictree.patch
Type: text/x-diff
Size: 1574 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041008/1b7e9455/generictree.bin


More information about the mythtv-dev mailing list