2012-12-31, 22:20
@jason
I'm still not convinced there is any need to cache or reuse any of the controls, in fact I think updating them will actually be inefficient, again because it has to be done one at a time and I'm sure will involve some locking, maybe even a refresh/render of the screen.
Try commenting out this line in the setButtons method to stop them getting reused;
Then change the getbutton method to just this:
Obviously the parameters will need to be added to the method calls and the sets removed.
This way controls are created from scratch each time they are needed already in the right position, size, and labelled, so you should then be able to remove all the stuff related to the activateChanges method in the EPGButton class (or just make the method return without doing anything) as they are never changed, just created and destroyed.
This will also require you to change the moveButtonsUp and moveButtonsDown so they just remove all the current controls and create all the news ones from scratch again, anything that updates existing controls is going to be a killer!! (although I can live with the timebar doing it LOL).
Like I said in my earlier post you have put tons of stuff in to basically get round a bug that was introduced into the WindowXML class which has now been fixed, and that stuff now appears to be causing you issues (see here http://trac.xbmc.org/ticket/13538 )
Our addon can easily render over 200 controls no problem, so PseudoTV should be even quicker (I would like to suggest instantaneous).
I'm still not convinced there is any need to cache or reuse any of the controls, in fact I think updating them will actually be inefficient, again because it has to be done one at a time and I'm sure will involve some locking, maybe even a refresh/render of the screen.
Try commenting out this line in the setButtons method to stop them getting reused;
Code:
rowbuttons.extend(self.channelButtons[row])
Then change the getbutton method to just this:
Code:
def getButton(self, x, y, h, w, label):
return EPGButton(self, x, y, w, h, label)
Obviously the parameters will need to be added to the method calls and the sets removed.
This way controls are created from scratch each time they are needed already in the right position, size, and labelled, so you should then be able to remove all the stuff related to the activateChanges method in the EPGButton class (or just make the method return without doing anything) as they are never changed, just created and destroyed.
This will also require you to change the moveButtonsUp and moveButtonsDown so they just remove all the current controls and create all the news ones from scratch again, anything that updates existing controls is going to be a killer!! (although I can live with the timebar doing it LOL).
Like I said in my earlier post you have put tons of stuff in to basically get round a bug that was introduced into the WindowXML class which has now been fixed, and that stuff now appears to be causing you issues (see here http://trac.xbmc.org/ticket/13538 )
Our addon can easily render over 200 controls no problem, so PseudoTV should be even quicker (I would like to suggest instantaneous).