Depends how quickly you're hitting the governance limit. If you're only just reaching it, pass the invoice data to a restlet and let that do the processing, which will give 5x the governance limit of a suitelet. Beyond that, split the data into chunks and pass each in turn to a restlet, or switch to a scheduled or map/reduce script as battk says.