Issue674932

classification
Title: file flushed to disk too often
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: fwierzbicki, pedronis, zyasoft
Priority: low Keywords:

Created on 2003-01-26.13:08:33 by pedronis, last changed 2009-03-12.08:15:21 by zyasoft.

Messages
msg813 (view) Author: Samuele Pedroni (pedronis) Date: 2003-01-26.13:08:33
Consider:

file = open("PrintTest.txt",'w')
item = "some, comma, separated, values"
for i in range(10000):
  print >> file, item
#  file.write(item)
#  file.write('\n')

file.close()


1. it seems that in general we force to write to disk 
instead of simply passing buffer data along to the OS 
each time a buffer is full, isn't that too often?

2. print is implemented so to flush to buffer very often 
(each line (?)), this should be in principle decided by 
the underlying file not at print impl level.


[Workarounds: increase buffer size (?), using file.write 
instead of print ]
msg4242 (view) Author: Jim Baker (zyasoft) Date: 2009-03-12.08:15:21
This should have been fixed by the pynio work.
History
Date User Action Args
2009-03-12 08:15:21zyasoftsetstatus: open -> closed
nosy: + zyasoft
resolution: fixed
messages: + msg4242
2009-03-03 18:02:32fwierzbickisetnosy: + fwierzbicki
2003-01-26 13:08:33pedroniscreate