CptPicard, you may consider asking this question on python mailing list. I suspect there is some module what makes this generation much faster....