[squeak-dev] FileStreams Limit

Jörg Belger unique75 at web.de
Thu Feb 17 16:34:08 UTC 2022


Funny, I commented out some things (red) in #open:forWrite:. Now the profiler is telling me that „String new: 1“ tools 97.4%… Really? Or is this a profiler bug?

open: fileName forWrite: writeMode 
	"Open the file with the given name. If writeMode is true, allow writing, otherwise open the file in read-only mode."
	"Changed to do a GC and retry before failing ar 3/21/98 17:25"
	| f |
	f := fileName asVmPathName.

	fileID := "StandardFileStream retryWithGC:[" self primOpen: f writable: writeMode "] 
					until:[:id| id notNil] 
					forFileNamed: fileName".
	fileID ifNil: [^ nil].  "allows sender to detect failure"
	name := fileName.
	"self register."
	rwmode := writeMode.
	buffer1 := String new: 1.
	self enableReadBuffering

> Am 17.02.2022 um 17:25 schrieb Jörg Belger <unique75 at web.de>:
> 
> MultiByteFileStream >> open:forWrite: needs  96.8%
> 
> Can I increase the tallying depth? Because it stops at this method and I do not see the calls inside this method.
> 
>> Am 17.02.2022 um 17:18 schrieb David T. Lewis <lewis at mail.msen.com <mailto:lewis at mail.msen.com>>:
>> 
>> TimeProfileBrowser onBlock: [10000 timesRepeat: [(FileStream fileNamed: 'test,txt') close]].
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220217/4b2dd498/attachment.html>


More information about the Squeak-dev mailing list