From f19c6420bff846ccdf791e081cc3d16ac9ec8a25 Mon Sep 17 00:00:00 2001
From: James Cameron <quozl@laptop.org>
Date: Wed, 23 Dec 2009 15:35:32 +1100
Subject: [PATCH] dev.laptop.org #9924: remove O_SYNC on log file open, tentative
Removes the O_SYNC on opening of log files, which on systems with slow
filesystem random write performance results in a more consistent
activity startup time.
---
src/sugar/activity/activityfactory.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py
index ee0fd92..a16840d 100644
|
a
|
b
|
|
| 153 | 153 | path = env.get_logs_path('%s-%s.log' % (activity.get_bundle_id(), i)) |
| 154 | 154 | try: |
| 155 | 155 | fd = os.open(path, os.O_EXCL | os.O_CREAT \ |
| 156 | | | os.O_SYNC | os.O_WRONLY, 0644) |
| | 156 | | os.O_WRONLY, 0644) |
| 157 | 157 | f = os.fdopen(fd, 'w', 0) |
| 158 | 158 | return (path, f) |
| 159 | 159 | except OSError, e: |