I've used the code provided sucessfully on several occasions, but it probably doesn't address you memory or speed issues.
In reply to Re: Combining PDFs by DrPeter in thread Combining PDFs by artist