mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-09 22:58:28 +02:00
sectionsd: optimize the slow_addevent case a tiny bit (10%)
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1474 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 4a49fb4083
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-05-15 (Sun, 15 May 2011)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -934,8 +934,14 @@ if (slow_addevent)
|
|||||||
/* do we need this check? */
|
/* do we need this check? */
|
||||||
if (x_key == e_key)
|
if (x_key == e_key)
|
||||||
continue;
|
continue;
|
||||||
if ((*x)->times.begin()->startzeit != start_time)
|
if ((*x)->times.begin()->startzeit > start_time)
|
||||||
continue;
|
continue;
|
||||||
|
/* iterating backwards: if the starttime of the stored events
|
||||||
|
* is earlier than the new one, we'll never find an identical one
|
||||||
|
* => bail out */
|
||||||
|
if ((*x)->times.begin()->startzeit < start_time)
|
||||||
|
break;
|
||||||
|
/* here we have (*x)->times.begin()->startzeit == start_time */
|
||||||
if ((*x)->table_id < e->table_id)
|
if ((*x)->table_id < e->table_id)
|
||||||
{
|
{
|
||||||
/* if we already have an event with the same start time but a lower
|
/* if we already have an event with the same start time but a lower
|
||||||
|
Reference in New Issue
Block a user