views:

28

answers:

1

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?

+1  A: 

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.

kriss
thanks for the suggestions, I'll definitely try both options with different settings.
Bala Clark