On Tue, 9 Nov 2010, Levente Uzonyi wrote:
On Tue, 9 Nov 2010, Philippe Marschall wrote:
Hi
I have a case where the #& in Socket >> #waitForSendDoneFor: shows up in
a tally (see attachment). I'm able to push about 1 Mbyte/s more when I
replace that with #and:. So my question is this really needed or should
I file a bug and send a patch?
I "fixed" this once by for Squeak, but I didn't push this change. Here's the
boolean expression:
(sendDone := self primSocketSendDone: socketHandle) not and: [
self isConnected and: [
"Connection end and final data can happen fast, so test in
this order"
Time millisecondClockValue < deadline] ]
This refactoring saves one #isConnected send which may not be significant.
I just realized, that you replaced #& already to #and:, so nvm.
Levente
The appearence of #& in MessageTally may be just false measurement. IIRC with
the current VMs the time spent in primitives are added to the next real
message send (for performance reasons), which means that the
#primSocketConnectionStatus: from #isConnected may be showing up there. Let
me know if this change helps.
Levente
This is Pharo 1.1.1 BTW.
Cheers
Philippe