Use demandimport - automatic demandloading of modules
I tried to use demandimport([http://hg.intevation.org/mercurial/crew/file/tip/mercurial/demandimport.py]) in Gajim. Start time and memory usage decreased:
test@dicson:~$ gajimt
2.34304189682
len(sys.modules) = 804
test@dicson:~$ gajimt
1.74128389359
len(sys.modules) = 500
Memory usage was reduced from 34.4 MB to 28.5 MB. May be worth considering the possibility of using this module.