You are deploying to shinyapps.io? Is there anything in the log files that might help you to find out why executing that chunk takes so much time?
These posts might be interesting for you