[squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut:
(was: Squeak 4.6 release update)
Tobias Pape
Das.Linux at gmx.de
Sun Mar 8 19:37:47 UTC 2015
Hi,
thanks for taking the time to check!
On 08.03.2015, at 20:03, Levente Uzonyi <leves at elte.hu> wrote:
>
> #flush is pretty costly, and IMO it's called way too often if it's in
> #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments.
> I changed the last lines of ClassDescription >> #classComment:stamp: in my image to
>
> self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp.
> InMidstOfFileinNotification signal ifFalse: [file flush].
> SystemChangeNotifier uniqueInstance classCommented: self.
>
> Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone.
Can you tell me whether the Changes file is read/written via one stream or two?
I understood its two file descriptors but are these two in different streams or
the same stream?
Best
-Tobias
More information about the Squeak-dev
mailing list
|