Opened 14 years ago

Closed 14 years ago

#1720 closed patch (fixed)

skip redundant updates in mythwelcome

Reported by: gnassas@… Owned by: paulh
Priority: minor Milestone: 0.20
Component: mythtv Version: 0.19
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Problem: After the frontend exits mythwelcome can get overwhelmed with all the schedule and recording list update events which were fired while it was blocked. It kicks off a platoon of handlers which is pointless given that they're all doing the exact same thing at the same time.

Solution: Allow only one update at a time based on a handler pending flag. In a fit of over-engineering I guard flag accesses with mutexes to protect those lucky ones with hyperthreading.

Result: On my epia it can take 10 seconds to chew through a dozen SCHEDULE_CHANGE events but with this patch it never takes more than a second or so to get the display up-to-date. Doesn't sound like much but the only time I ever pay attention to the "next recording" bit is right after exiting mythfrontend so having a prompt update gives my pvr that Quality Software feel.

Attachments (1)

welcome.diff.gz (890 bytes) - added by gnassas@… 14 years ago.
da patch

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by gnassas@…

Attachment: welcome.diff.gz added

da patch

comment:1 Changed 14 years ago by paulh

Owner: changed from Isaac Richards to paulh
Status: newassigned

I thought I'd taken care of multiple custom events getting queued up while the frontend was running by calling

gContext->removeListener(this)

just before running the frontend. It must not be working the way I thought it was.

Actually I can see why it's not working now. The backend is sending these SCHEDULE_CHANGE and RECORDING_LIST_CHANGED messages to the event socket in Mythwelcome but because its blocked waiting for the frontend they don't get processed and dispatched until the frontend exits. By this time the listener has been put back. Doh!!

comment:2 Changed 14 years ago by paulh

Resolution: fixed
Status: assignedclosed

(In [9786]) Apply patch to close #1720 : skip redundant updates in mythwelcome

Note: See TracTickets for help on using tickets.