[PATCH] use manifest files in plugin system
I tested the speed of the start Gajim when added to the file plaginmanager.py this code:
Registered handlers of GUI extension points.
'''
a = time.time()
for path in gajim.PLUGINS_DIRS:
self.add_plugins(PluginManager.scan_dir_for_plugins(path))
b = time.time() - a
print b
#log.debug('plugins: %s'%(self.plugins))
self._activate_all_plugins_from_global_config()
#log.debug('active: %s'%(self.active_plugins))
Befor patch:
test@dicson:~$ '/home/test/gajim/launch.sh'
0.106698989868
test@dicson:~$ '/home/test/gajim/launch.sh'
0.105970144272
test@dicson:~$ '/home/test/gajim/launch.sh'
0.1048579216
test@dicson:~$ '/home/test/gajim/launch.sh'
0.105332136154
test@dicson:~$ '/home/test/gajim/launch.sh'
After:
test@dicson:~$ '/home/test/gajim/launch.sh'
0.104485034943
test@dicson:~$ '/home/test/gajim/launch.sh'
0.106462001801
test@dicson:~$ '/home/test/gajim/launch.sh'
0.105379104614
test@dicson:~$ '/home/test/gajim/launch.sh'
0.112509012222
test@dicson:~$ '/home/test/gajim/launch.sh'
0.105584859848
test@dicson:~$ '/home/test/gajim/launch.sh'
0.124591112137
test@dicson:~$ '/home/test/gajim/launch.sh'
0.105065107346
test@dicson:~$ '/home/test/gajim/launch.sh'
0.104741811752
I have 15 plug-ins