Jump to content

Why is auto-upgrader slow?


Recommended Posts

Michaël,

 

You know I love auto-upgrade function. It relieves merchants and developers alike from the tedious procedure of manual upgrades. I am sure it also reduces questions/stress on these forums whenever a new version is released - because there used to be plenty of questions/problems around manual updating. I am on a crappy shared host (whose name rhymes with snow nappy) and it takes 2-3 attempts for me to update PS using autoupgrade, but ultimately it works.

 

I have a question as a lay person and merchant. When I go to the autoupgrade page in admin panel, if the current version is newer than the installed version then there's an Ajax wheel keeps going round and round for ages before finally emerging back as what I can only surmise as a top-level diff report...something like "6 files have changed (20 total)". I suspect this means that from installed version to current version there are either 6 or 20 files that are different.

 

Then if I hit Upgrade Prestashop Now button, current version is downloaded, extracted, backups are done, and finally thousands of files are written.

 

This process takes a long time, and remember on production sites, the site needs to be down while upgrading.

 

So, coming to the question(s):

1) Instead of the time consuming process of creating diff reports on the fly, wouldn't it be more efficient to create several version-to-version diff reports and store them on Prestashop server? e.g. When my site connects to PS, it tells PS that my installed version is 1.4.5.0 (say). Current version is 1.4.7.1 (say). So PS pulls up a static file containing the difference between 1.4.5.0 and 1.4.7.1 which it created and stored at the time that 1.4.7.1 was released and supplies to my site. Job done. Half a second, if that.

2) If only 20 files are different, why do thousands of files need to be written? Can't you simply erase, modify and add the differences?

 

I'm sure this is probably a too simplistic view, and perhaps quite inaccurate as well, but would be great if you can help explain...

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...