Pseudo-inverse of large matrix very slow

I have solved this problem, this answer is helpful.