[100217] trunk/base/src/cregistry/registry.c
cal at macports.org
cal at macports.org
Mon Dec 3 16:12:26 PST 2012
Revision: 100217
https://trac.macports.org/changeset/100217
Author: cal at macports.org
Date: 2012-12-03 16:12:26 -0800 (Mon, 03 Dec 2012)
Log Message:
-----------
registry: use sqlite3_busy_timeout
This caps CPU usage of MacPorts processes waiting for the registry
database while it is exclusively locked at about 1.5%. This could be
further reduced by using a busy handler and adjusting the timeout
depending on the number of calls to the busy handler.
Modified Paths:
--------------
trunk/base/src/cregistry/registry.c
Modified: trunk/base/src/cregistry/registry.c
===================================================================
--- trunk/base/src/cregistry/registry.c 2012-12-03 23:43:54 UTC (rev 100216)
+++ trunk/base/src/cregistry/registry.c 2012-12-04 00:12:26 UTC (rev 100217)
@@ -118,6 +118,8 @@
sqlite3_extended_result_codes(reg->db, 1);
#endif
+ sqlite3_busy_timeout(reg->db, 25);
+
if (init_db(reg->db, errPtr)) {
reg->status = reg_none;
*regPtr = reg;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121203/70767e9d/attachment.html>
More information about the macports-changes
mailing list