I am writing an app that will need to unzip user uploaded archives. PHP provides the ZipArchive class, but it should also be possible to unzip using unzip via exec(), my question is which is preferrable in terms of performance & scaling?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A you use php, I guess it would be an online App.
As Brian hinted library will most probably be faster as it has much less to do.
On the other hand if you really want to know for sure, just try. Things like compilation options for ZipArchive and binary unzip can have high impact.
You should also consider unziping as a background task with some ajax to warn when it’s done as unzipping can be a long task.