making python client more CPU efficient