inprove performance

This commit is contained in:
chrys 2016-09-25 22:20:49 +02:00
parent b5dc878d37
commit 8c2b4523f4

View File

@ -35,6 +35,7 @@ class fenrir():
self.shutdown() self.shutdown()
def handleProcess(self): def handleProcess(self):
#startTime = time.time()
eventReceived = self.environment['runtime']['inputManager'].getInputEvent() eventReceived = self.environment['runtime']['inputManager'].getInputEvent()
if eventReceived: if eventReceived:
self.prepareCommand() self.prepareCommand()
@ -50,13 +51,12 @@ class fenrir():
self.environment['input']['keyForeward'] -=1 self.environment['input']['keyForeward'] -=1
self.environment['input']['prevDeepestInput'] = [] self.environment['input']['prevDeepestInput'] = []
else: else:
startTime = time.time()
self.environment['runtime']['screenManager'].update() self.environment['runtime']['screenManager'].update()
self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput') self.environment['runtime']['commandManager'].executeDefaultTrigger('onInput')
print(time.time()-startTime)
else: else:
self.environment['runtime']['screenManager'].update() self.environment['runtime']['screenManager'].update()
if self.environment['runtime']['applicationManager'].isApplicationChange(): if self.environment['runtime']['applicationManager'].isApplicationChange():
self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange') self.environment['runtime']['commandManager'].executeDefaultTrigger('onApplicationChange')
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \ self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \