[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mythtv-commits
Subject:    [mythtv-commits] Ticket #8117: Artificial 2 sec delays in all
From:       "MythTV" <mythtv () cvs ! mythtv ! org>
Date:       2010-02-28 20:40:08
Message-ID: 050.c7b85f34f4f96befb24a86ad79d470bc () cvs ! mythtv ! org
[Download RAW message or body]

#8117: Artificial 2 sec delays in all MythWeb requests
------------------------------+---------------------------------------------
 Reporter:  foceni@…          |       Owner:  kormoc 
     Type:  defect            |      Status:  new    
 Priority:  major             |   Milestone:  unknown
Component:  Plugin - MythWeb  |     Version:  head   
 Severity:  medium            |     Mlocked:  0      
------------------------------+---------------------------------------------
 I've been using MythWeb for a really long time, always trunk, but I began
 noticing serious delays associated with each request for the past couple
 of weeks (months?).

 A moment ago I tried using my old 0.21 version (just changing the protocol
 version) and everything was blazing fast again. Trace of the Apache
 process showed me two timed out 1 sec poll()'s and I pinned the issue down
 to sendCommand() function in MythBackend.php.

 There's an "input flushing" receiveData(1) right after connect(), which
 causes these delays. In my case, these artificial delays are triggered
 when the connection isn't open and connect() has to be called. In other
 words - a situation where socket I/O buffer is empty. In such case, this
 "insurance" call to receiveData(1) blocks unnecessarily for 1 sec every
 time.

 I'm attaching a simple patch which introduces an optional millisecond
 timeout argument to receiveData(). SendCommand() uses it to wait just 1
 msec. It's compatible with the rest of the code, but feel free to fix this
 any way you like.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8117>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic