[Release] Common plugin cache
#76
During some profiling work i noticed that thread XBPython StorageServer.py ("Common plugin Cache") keeps hammering my system with a socket select in StorageServer.py every 0,5 sec. This consumes a lot of cpu power on iPad/iPhone/Androids/RPi's. Is this a bug or feature? "time.sleep(0.5)" is the guilty line down below in section 2. Btw, what's the purpose of that poll loop? /Thanks, Lars.

Call path:

1. File: "addons/script.common.plugin.cache/default.py"
Code:
def run():
    sys.path = [settings.getAddonInfo('path') + "/lib"] + sys.path
    import StorageServer
    s = StorageServer.StorageServer(False)
    print " StorageServer Module loaded RUN"
    print s.plugin + " Starting server"
    s.run()
    return True


2. File: "addons/script.common.plugin.cache/lib/StorageServer.py"
Code:
while not self._aborting():
            if waiting == 0:
                self._log("accepting", 3)
                waiting = 1
            try:
                (self.clientsocket, address) = sock.accept()
                if waiting == 2:
                    self._log("Waking up, slept for %s seconds." % int(time.time() - idle_since))
                waiting = 0
            except socket.error, e:
                if e.errno == 11 or e.errno == 10035 or e.errno == 35:
                    # There has to be a better way to accomplish this.
                    if idle_since + self.idle < time.time():
                        if self.instance:
                            self.die = True
                        if waiting == 1:
                            self._log("Idle for %s seconds. Going to sleep. zzzzzzzz " % self.idle)
                        time.sleep(0.5)
                        waiting = 2
                    continue
                self._log("EXCEPTION : " + repr(e))
            except:
                pass
1. XBMC: http://github.com/FlyingRat/xbmc (ffmpeg-head-inc-xbmc-patches)
2. FFmpeg: http://github.com/FlyingRat/FFmpeg (ffmpeg-head-with-xbmc-custom-patches)
3. XBMC-updated-FFmpeg-binaries (just dev snapshots, no regular distros)
Reply


Messages In This Thread
[No subject] - by divingmule - 2011-12-09, 19:38
[No subject] - by TobiasTheCommie - 2011-12-09, 19:46
[No subject] - by divingmule - 2011-12-09, 20:33
[No subject] - by TobiasTheCommie - 2011-12-10, 06:42
[No subject] - by divingmule - 2011-12-16, 16:41
[No subject] - by TobiasTheCommie - 2011-12-16, 17:04
[No subject] - by divingmule - 2011-12-17, 00:15
[No subject] - by dangerFlakes - 2012-01-09, 21:43
[No subject] - by TobiasTheCommie - 2012-01-09, 23:39
[No subject] - by dangerFlakes - 2012-01-12, 06:12
[No subject] - by TobiasTheCommie - 2012-01-12, 13:03
[No subject] - by dangerFlakes - 2012-01-13, 04:00
[No subject] - by TobiasTheCommie - 2012-01-13, 04:42
RE: [Release] Common plugin cache - by van141 - 2015-03-22, 03:50
[No subject] - by dangerFlakes - 2012-01-14, 03:57
[No subject] - by Bstrdsmkr - 2012-01-24, 23:17
[No subject] - by TobiasTheCommie - 2012-01-26, 21:37
[No subject] - by TobiasTheCommie - 2012-01-27, 01:42
[No subject] - by Martijn - 2012-01-27, 01:54
[No subject] - by TobiasTheCommie - 2012-01-27, 02:05
[No subject] - by Martijn - 2012-01-27, 02:12
[No subject] - by TobiasTheCommie - 2012-01-27, 02:20
[No subject] - by Martijn - 2012-01-27, 02:23
[No subject] - by TobiasTheCommie - 2012-01-27, 02:28
[No subject] - by Jarviss - 2012-02-01, 15:37
[No subject] - by TobiasTheCommie - 2012-02-01, 15:54
Why roll your own? - by Bighampton - 2012-02-02, 19:11
[No subject] - by TobiasTheCommie - 2012-02-02, 20:34
[No subject] - by Popeye - 2012-02-03, 11:15
[No subject] - by TobiasTheCommie - 2012-02-03, 13:29
[No subject] - by Martijn - 2012-02-03, 14:32
[No subject] - by Popeye - 2012-02-03, 17:41
[No subject] - by leo gal - 2012-02-05, 06:19
[No subject] - by TobiasTheCommie - 2012-02-05, 12:11
[No subject] - by leo gal - 2012-02-05, 18:21
[No subject] - by TobiasTheCommie - 2012-02-05, 19:11
[No subject] - by leo gal - 2012-02-05, 19:55
[No subject] - by TobiasTheCommie - 2012-02-05, 20:07
[No subject] - by Martijn - 2012-02-05, 20:27
[No subject] - by leo gal - 2012-02-05, 20:59
[No subject] - by TobiasTheCommie - 2012-02-09, 16:12
[No subject] - by leo gal - 2012-02-16, 06:52
[No subject] - by TobiasTheCommie - 2012-02-17, 01:07
[No subject] - by leo gal - 2012-02-17, 05:18
[No subject] - by TobiasTheCommie - 2012-02-17, 13:36
RE: - by leo gal - 2012-03-20, 05:13
RE: [Release] Common plugin cache - by ericab - 2012-03-22, 22:29
RE: [Release] Common plugin cache - by DeanM3 - 2012-12-02, 15:28
RE: [Release] Common plugin cache - by DeanM3 - 2012-12-15, 15:44
RE: [Release] Common plugin cache - by jarryd - 2013-01-05, 05:38
RE: [Release] Common plugin cache - by Domin - 2013-03-03, 10:25
RE: [Release] Common plugin cache - by flyingrat - 2013-05-03, 17:22
RE: [Release] Common plugin cache - by azybmz - 2013-08-19, 21:50
RE: [Release] Common plugin cache - by azybmz - 2013-08-20, 07:23
RE: [Release] Common plugin cache - by phinc - 2013-09-02, 22:43
RE: [Release] Common plugin cache - by memeka - 2013-09-06, 05:17
RE: [Release] Common plugin cache - by Koying - 2014-01-29, 14:29
RE: [Release] Common plugin cache - by Koying - 2014-01-29, 15:04
RE: [Release] Common plugin cache - by Koying - 2014-01-29, 15:14
RE: [Release] Common plugin cache - by Koying - 2014-01-29, 16:38
RE: [Release] Common plugin cache - by ED-209 - 2014-02-03, 18:24
RE: [Release] Common plugin cache - by ED-209 - 2014-02-04, 15:46
RE: [Release] Common plugin cache - by cw-kid - 2014-02-06, 20:11
RE: [Release] Common plugin cache - by cw-kid - 2014-02-08, 15:48
RE: [Release] Common plugin cache - by ED-209 - 2014-02-10, 00:50
RE: [Release] Common plugin cache - by KenV99 - 2014-06-01, 16:40
RE: [Release] Common plugin cache - by tekno - 2014-07-30, 04:53
RE: [Release] Common plugin cache - by bibi - 2015-01-17, 10:40
RE: [Release] Common plugin cache - by kayone - 2015-02-20, 21:19
RE: [Release] Common plugin cache - by kayone - 2015-02-21, 09:46
RE: [Release] Common plugin cache - by kayone - 2015-02-23, 18:24
RE: [Release] Common plugin cache - by hardyt - 2016-02-18, 09:54
RE: [Release] Common plugin cache - by ronie - 2016-02-23, 13:12
RE: [Release] Common plugin cache - by Razze - 2016-03-02, 22:25
RE: [Release] Common plugin cache - by gujal - 2019-04-11, 07:19
RE: [Release] Common plugin cache - by gujal - 2019-04-11, 07:10
Logout Mark Read Team Forum Stats Members Help
[Release] Common plugin cache1