dvbepg: optimize EPG duplicated entry handling

Authored by mauroc on Feb 16 2017, 10:59 AM.

Description

dvbepg: optimize EPG duplicated entry handling

The current logic to detect duplicated/obsolated entries is
too slow. it uses a for loop, with is O(n). That causes severe
performance issues when a high number of entries is updated, like
on DVB-S/S2 providers.

Such performance impact is so severe that, on my desktop with a
i7-6770HQ CPU @ 2.60GHz with 32 GB ram, if I open the program
guide while watching a DVB-S2 channel, after a while I can't close
the program guide window anymore, and it starts dropping frames.

So, change the logic to be O(log n), by using QMap's find()
function.

Unfortunately, doing that has a side effect: the new algorithm
doesn't allow anymore to detect if a new entry with a different
start time is obsoleting a past entry.

BUG: 371579
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

Details

Committed
maurocFeb 16 2017, 11:14 AM
Parents
R466:5f76974435ab: vlcmediawidget: unmute audio when the player instance is created
Branches
Unknown
Tags
Unknown