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>
parent
5f769744
Please register or sign in to comment