[mythtv-commits] Ticket #7238: Unsafe std::list access & O(n^2) algo where O(n) possible in [22239]
MythTV
mythtv at cvs.mythtv.org
Sun Oct 4 21:02:36 UTC 2009
#7238: Unsafe std::list access & O(n^2) algo where O(n) possible in [22239]
------------------------------+---------------------------------------------
Reporter: danielk | Owner: cpinkham
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: unknown
Severity: medium | Mlocked: 0
------------------------------+---------------------------------------------
I'm not in a position to test the fix right now, but I've attached a patch
that should at least compile.
The main problem is the size() access on the linked list in the deletion
loops. This is both a very expensive call which can be replaced by the
cheap empty() call, and also accesses data which can be invalidated during
execution because we call it outside the lock.
A smaller inefficienct is that we call glDeleteTextures() with a single
texture, we can easily convert this to a single call..
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/7238>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list