2

我有一个长时间运行的 post-commit 钩子,它更新了 subversion 存储库的索引(来自项目http://svnquery.tigris.org/) 由于提供了作为一部分的 RunDetached 可执行文件,postcommit 钩子已经作为一个单独的线程运行svn查询。postcommit 钩子是

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

这工作正常,除了它将 CPU 使用率提高到 100% 并耗尽系统上的其他线程,使我的机器无响应。无论如何,一般情况下是否可以从 svn 挂钩运行具有较低线程优先级的进程?

(这是在 Windows Server 2003 盒子上)

4

2 回答 2

1

您应该能够 RunDetached 一个运行 svnindex 的批处理文件,然后使用ProcessUtil 之类的东西来降低其优先级。

于 2010-01-08T16:15:11.887 回答
1

我建议您对 svnindex 项目提出增强请求:

添加一个新参数来指定线程优先级

一旦实现,您就可以将挂钩脚本中的新参数传递给 svnindex.exe 并让它以指定的线程优先级运行。

于 2010-01-08T18:28:04.950 回答