Bug#466777: Eats a lot of cpu and blocks gui

2008-02-21 Thread Michael Lamothe
Hi Matthias,

I think that these issues are addressed at
https://bugs.launchpad.net/ubuntu/+source/me-tv/+bug/192355.  If
you've got the time then please try the new upstream 0.5.19 and tell
me if it fixes your issues.

The EPG reader _is_ in a separate thread but GTK is not multi-thread
safe, it is however multi-thread aware.  The issue is that GTK really
only allows 1 thread to update the UI at a time, that's why it appears
to lock-up.  I've made the EPG update yield its lock more regularly
which I think gets around this issue.

There can be several reasons why your CPU usage might be high, if you
find that 0.5.19 does not fix your issue then we might need to isolate
further.  Please let me know.

Thanks for trying Me TV.  I hope that we can sort these issues out so
that you can enjoy it as much as I do. :)

Thanks,

Michael

On 21/02/2008, Matthias Bläsing [EMAIL PROTECTED] wrote:
 Package: me-tv
  Version: 0.5.17-1
  Severity: normal

  --- Please enter the report below this line. ---

  Hey,

  me-tv is a very nice programm. But currently I'm faced with two big
  problems. The first might be unavoidable. The first is the high cpu
  utilisation when a new channel is selected. I asume this happens when
  the epg data is parsed. It would be nice if this utilisation could be
  reduced.

  The real problem is, that the gui blocks, when a new channel is
  selected. This should not happen - the epg data parsing could be done in
  a seperate thread or (maybe easier) in a child process.

  I attached a log - the whole time after the channel was tuned in
  (directly at the beginning), the gui was not usable.

  Greetings

  Matthias

  --- System information. ---
  Architecture: i386
  Kernel:   Linux 2.6.24

  Debian Release: lenny/sid
   500 unstablewww.debian-multimedia.org
   500 unstableopensync.gforge.punktart.de
   500 unstableftp.de.debian.org
   500 unstableaqbanking.alioth.debian.org
   500 testing ftp.de.debian.org
 1 experimentalftp.de.debian.org

  --- Package information. ---
  Depends (Version) | Installed
  =-+-
  dvb-utils | 1.1.1-3
  libart-2.0-2  (= 2.3.18) | 2.3.20-1
  libatk1.0-0   (= 1.20.0) | 1.20.0-1
  libbonobo2-0  (= 2.15.0) | 2.21.90-1
  libbonoboui2-0(= 2.15.1) | 2.21.90-1
  libc6  (= 2.7-1) | 2.7-8
  libcairo2  (= 1.4.0) | 1.5.6-1
  libgcc1   (= 1:4.1.1-21) | 1:4.3-20080202-1
  libgconf2-4   (= 2.13.5) | 2.20.1-3
  libglade2-0  (= 1:2.6.1) | 1:2.6.2-1
  libglib2.0-0  (= 2.12.0) | 2.14.6-1
  libgnet2.0-0   (= 2.0.7) | 2.0.7-1
  libgnome2-0   (= 2.17.3) | 2.20.1.1-1
  libgnomecanvas2-0 (= 2.11.1) | 2.20.1.1-1
  libgnomeui-0  (= 2.17.1) | 2.20.1.1-1
  libgnomevfs2-0 (= 1:2.17.90) | 1:2.20.1-2
  libgtk2.0-0   (= 2.12.0) | 2.12.8-1
  libice6  (= 1:1.0.0) | 2:1.0.4-1
  liborbit2  (= 1:2.14.10) | 1:2.14.10-0.1
  libpango1.0-0 (= 1.18.4) | 1.18.4-1
  libpopt0(= 1.10) | 1.10-3
  libsm6| 2:1.0.3-1+b1
  libstdc++6  (= 4.1.1-21) | 4.3-20080202-1
  libx11-6  | 2:1.0.3-7
  libxine1   (= 1.1.8) | 1.1.10.1-1
  libxine1-ffmpeg   | 1.1.10.1-1
  libxine1-x| 1.1.10.1-1
   OR libxine1 ( 1.1.8-2) | 1.1.10.1-1
  libxml2   (= 2.6.27) | 2.6.31.dfsg-1
  libxtst6  | 2:1.0.3-1







Bug#466777: Eats a lot of cpu and blocks gui

2008-02-21 Thread Matthias Bläsing
Hey Michael,

I'll try the new version (not sure though whether it will be possible
before saturday. Thanks! One comment though:


Am Donnerstag, den 21.02.2008, 22:39 +1100 schrieb Michael Lamothe:

 The EPG reader _is_ in a separate thread but GTK is not multi-thread
 safe, it is however multi-thread aware.  The issue is that GTK really
 only allows 1 thread to update the UI at a time, that's why it appears
 to lock-up.  I've made the EPG update yield its lock more regularly
 which I think gets around this issue.

Why not switch from multiple threads to multiple processes. As I
understand some processing of the EPG data is necessary. So do that in
another threat an let the two processes communicate via a pipe or a
socket. These two can be monitored by an gobject watch and you don't
have to deal with threading locks.

Not sure thought whether this would be trivial to be changed.

Greetings

Matthias

-- 
So long and thanks for all the fish!


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Bug#466777: Eats a lot of cpu and blocks gui

2008-02-20 Thread Matthias Bläsing
Package: me-tv
Version: 0.5.17-1
Severity: normal

--- Please enter the report below this line. ---

Hey,

me-tv is a very nice programm. But currently I'm faced with two big
problems. The first might be unavoidable. The first is the high cpu
utilisation when a new channel is selected. I asume this happens when
the epg data is parsed. It would be nice if this utilisation could be
reduced.

The real problem is, that the gui blocks, when a new channel is
selected. This should not happen - the epg data parsing could be done in
a seperate thread or (maybe easier) in a child process.

I attached a log - the whole time after the channel was tuned in
(directly at the beginning), the gui was not usable.

Greetings

Matthias

--- System information. ---
Architecture: i386
Kernel:   Linux 2.6.24

Debian Release: lenny/sid
  500 unstablewww.debian-multimedia.org 
  500 unstableopensync.gforge.punktart.de 
  500 unstableftp.de.debian.org 
  500 unstableaqbanking.alioth.debian.org 
  500 testing ftp.de.debian.org 
1 experimentalftp.de.debian.org 

--- Package information. ---
Depends (Version) | Installed
=-+-
dvb-utils | 1.1.1-3
libart-2.0-2  (= 2.3.18) | 2.3.20-1
libatk1.0-0   (= 1.20.0) | 1.20.0-1
libbonobo2-0  (= 2.15.0) | 2.21.90-1
libbonoboui2-0(= 2.15.1) | 2.21.90-1
libc6  (= 2.7-1) | 2.7-8
libcairo2  (= 1.4.0) | 1.5.6-1
libgcc1   (= 1:4.1.1-21) | 1:4.3-20080202-1
libgconf2-4   (= 2.13.5) | 2.20.1-3
libglade2-0  (= 1:2.6.1) | 1:2.6.2-1
libglib2.0-0  (= 2.12.0) | 2.14.6-1
libgnet2.0-0   (= 2.0.7) | 2.0.7-1
libgnome2-0   (= 2.17.3) | 2.20.1.1-1
libgnomecanvas2-0 (= 2.11.1) | 2.20.1.1-1
libgnomeui-0  (= 2.17.1) | 2.20.1.1-1
libgnomevfs2-0 (= 1:2.17.90) | 1:2.20.1-2
libgtk2.0-0   (= 2.12.0) | 2.12.8-1
libice6  (= 1:1.0.0) | 2:1.0.4-1
liborbit2  (= 1:2.14.10) | 1:2.14.10-0.1
libpango1.0-0 (= 1.18.4) | 1.18.4-1
libpopt0(= 1.10) | 1.10-3
libsm6| 2:1.0.3-1+b1
libstdc++6  (= 4.1.1-21) | 4.3-20080202-1
libx11-6  | 2:1.0.3-7
libxine1   (= 1.1.8) | 1.1.10.1-1
libxine1-ffmpeg   | 1.1.10.1-1
libxine1-x| 1.1.10.1-1
 OR libxine1 ( 1.1.8-2) | 1.1.10.1-1
libxml2   (= 2.6.27) | 2.6.31.dfsg-1
libxtst6  | 2:1.0.3-1

[EMAIL PROTECTED]:~$ me-tv
Me TV-Message: 20.02.2008 22:05:28 - Me TV Version: 0.5.17
Me TV-Message: 20.02.2008 22:05:28 - Glade Datei 
'/usr/share/me-tv/glade/me-tv.glade' wird geladen
Me TV-Message: 20.02.2008 22:05:29 - EPG von '/home/mblaesing/.me-tv/epg.xml' 
wird geladen
Me TV-Message: 20.02.2008 22:05:29 - EPG Datei geladen
Me TV-Message: 20.02.2008 22:05:29 - Senderliste geladen
Me TV-Message: 20.02.2008 22:05:29 - Benutze die Maschine 'xine'
Me TV-Message: 20.02.2008 22:05:37 - Kanalwechsel zu 'ProSieben' wurde 
angefordert
Me TV-Message: 20.02.2008 22:05:37 - Kanal wird zu 'ProSieben' gewechselt
Me TV-Message: 20.02.2008 22:05:37 - Entferne verbleibende EPG Ereignisse
Me TV-Message: 20.02.2008 22:05:37 - Sichere EPG-Daten
Me TV-Message: 20.02.2008 22:05:37 - Aktualisiere EPG-Ansicht
Me TV-Message: 20.02.2008 22:05:45 - EPG Ereignisse entfernt
Me TV-Message: 20.02.2008 22:05:45 - Wechsle zum Transponder auf 1944000 ...
Me TV-Message: 20.02.2008 22:05:46 - Auf Singal-Lock warten ...
Me TV-Message: 20.02.2008 22:05:46 - Signal-Lock bekommen
Me TV-Message: 20.02.2008 22:05:46 - Zum Transponder auf 1944000 gewechselt
Me TV-Message: 20.02.2008 22:05:46 - Video Thead erzeugt
Me TV-Message: 20.02.2008 22:05:46 - Öffne gerade FIFO 
'fifo://home/mblaesing/.me-tv/video.fifo' ...
Me TV-Message: 20.02.2008 22:05:46 - -- Stream thread function
Me TV-Message: 20.02.2008 22:05:46 - Versuche PIDs automatisch zu erkennen
Me TV-Message: 20.02.2008 22:05:46 - Stream Thread erzeugt
Me TV-Message: 20.02.2008 22:05:46 - EPG Thread erzeugt
Me TV-Message: 20.02.2008 22:05:46 - 8 Verbindungen gefunden
Me TV-Message: 20.02.2008 22:05:46 - Teletext PID: 33
Me TV-Message: 20.02.2008 22:05:46 - Video PID: 511
Me TV-Message: 20.02.2008 22:05:46 - Audio PID: 512
Me TV-Message: 20.02.2008 22:05:46 - AC3 PID: 515
Me TV-Message: 20.02.2008 22:05:46 - Stream Thread: Setze Teletext PID Filter 
auf 33 (0x21)
Me TV-Message: 20.02.2008 22:05:46 - Stream Thread: Setze AC3 PID Filter auf 
515 (0x203)
Me TV-Message: 20.02.2008 22:05:46 - PIDs erfolgreich gelesen
Me TV-Message: 20.02.2008 22:05:46 - Stream Thread. Setze Video PID Filter auf 
511 (0x1ff)
Me TV-Message: 20.02.2008 22:05:46 - Stream Thread. Setze Audio PID Filter auf 
512 (0x200)
Me TV-Message: