From 5b0dfe0bafdb9f5fde2133524bfeb8ad29c2ff4c Mon Sep 17 00:00:00 2001
From: James Cameron <quozl@laptop.org>
Date: Tue, 9 Mar 2010 09:29:30 +1100
Subject: [PATCH] Removes the use of O_SYNC on logs
With O_SYNC on open of log files, on systems with slow filesystem random
write performance, there is random activity startup time.
http://bugs.sugarlabs.org/ticket/1656
---
src/sugar/activity/activityfactory.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py
index eda7d9a..c12630e 100644
a
|
b
|
def open_log_file(activity): |
149 | 149 | while True: |
150 | 150 | path = env.get_logs_path('%s-%s.log' % (activity.get_bundle_id(), i)) |
151 | 151 | try: |
152 | | fd = os.open(path, os.O_EXCL | os.O_CREAT \ |
153 | | | os.O_SYNC | os.O_WRONLY, 0644) |
| 152 | fd = os.open(path, os.O_EXCL | os.O_CREAT | os.O_WRONLY, 0644) |
154 | 153 | f = os.fdopen(fd, 'w', 0) |
155 | 154 | return (path, f) |
156 | 155 | except OSError, e: |