2
votes

I have a long-running post-commit hook that updates an index of subversion repository (from the project http://svnquery.tigris.org/) The postcommit hook already runs as a separate thread due to the RunDetached executable provided as part of svnquery. The postcommit hook is

C:\SvnIndex\RunDetached C:\SvnIndex\svnindex.exe update D:\IndexData D:\repository -f "(/tags/)|(/branches/)"

This works ok, except that it shoots the CPU usage up to 100% and starves out the other threads on the system, making my machine unresponsive. Is there anyway in general to run a process with a lower thread priority from an svn hook?

(This is on a Windows Server 2003 box)

2

2 Answers

1
votes

You should be able to RunDetached a batch file that runs svnindex and then uses something like ProcessUtil to lower its priority.

1
votes

I suggest you file an enhancement request for the svnindex project:

Add a new parameter to specify the thread priority

Once that's implemented, you could then pass the new parameter in your hook script to svnindex.exe and have it run with the specified thread priority.