Opened 14 years ago
Closed 14 years ago
#7238 closed patch (fixed)
Unsafe std::list access & O(n^2) algo where O(n) possible in [22239]
Reported by: | danielk | Owned by: | cpinkham |
---|---|---|---|
Priority: | minor | Milestone: | 0.22 |
Component: | MythTV - General | Version: | head |
Severity: | high | Keywords: | |
Cc: | Ticket locked: | no |
Description
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..
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | 7238-v1.patch added |
---|
comment:1 Changed 14 years ago by
Milestone: | unknown → 0.22 |
---|---|
Severity: | medium → high |
Type: | defect → patch |
Version: | unknown → head |
comment:2 Changed 14 years ago by
Note: See
TracTickets for help on using
tickets.
(In [22248]) Cleanup/optimization of the texture cleanup code in MythOpenGLPainter::Begin.
References #7238. Patch by Daniel, tested by me. After talking with Daniel, I'm only applying the OpenGL part of his patch because I'm unable to test the VDPAU portion. Once Daniel or someone else can confirm the VDPAU portion works OK, that part will be committed as well.