Php – svn repo for Magento is very slow!

magentoPHPsvnwebdav

I'm working on building a website using Magento eCommerce. I set up a subversion repo on the server for the website including all Magento PHP files and checked out a copy to my local system using svn/webdav. I've added magento to the repo and committed. Now, any svn opearation, even an svn status or svn commit, building the list of files so I can enter a commit message, takes forever. I mean upwards of 10 minutes, even if I only changed one file. Any ideas on what could be wrong/how to troubleshoot/how to fix/suggestions? Thanks!

Best Answer

I've been working with Magento + SVN(not WebDAV however) myself and didn't have those kind of problems so far. It takes long(as in 2 min) to commit changes to the repository but by no means more than 5 min.

I don't really know the cause of your problem, I just more or less wanted to say that it's usually not like that(or that it might be WebDAV's fault).

Workaround 1:

Assuming that you won't be making changes to the core of Magento, have you considered only versioning those parts of your Magento installation that will be changed by you? i.e. the app/code/local folder where your modules will reside and maybe your template folder. This would drastically reduce the total number of versioned files/folders and thereby significantly increase the synchonizing speed.

Workaround 2:

Always commit only the downmost folder that contains all the updates.

cd app/code 
svn commit -m ".." local

Workaround 3:

Similar to number 1: Try to add everything that doesn't need to be stored in the repo to the ignore list. Things like the var/ folder don't need to be versioned and contain a lot of files, so it might be a good idea not to include them to your repository.

Workaround 4:

Use git instead of SVN if that is an option for you.

eZ Components had the same problems with SVN + WebDAV and someone compared the checkout times between SVN+DAV with git. The results can be seen here.

After seeing those numbers, I think switching is your best available option in the long run.