<br><br><div class="gmail_quote">On Tue, Dec 8, 2009 at 12:05 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="gmail_quote"><div>On Tue, Dec 8, 2009 at 9:35 AM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br><br><div class="gmail_quote"><div>2009/12/8 Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>On Tue, 8 Dec 2009, Nicolas Cellier wrote:<br>
<br>
</div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<br>
Oh yes, like this ?<br>
<br>
| file |<br>
[file := MultiByteFileStream newFileNamed: &#39;mbfs_skip.tst&#39;.<br>
file ascii; wantsLineEndConversion: false; converter: UTF8TextConverter new.<br>
file nextPutAll: &#39;Ceci doit changé&#39;.<br>
file skip: -1. &quot;Oops - grammatically incorrect&quot;<br>
file nextPutAll: &#39;er&#39;.<br>
file close.<br>
<br>
file := StandardFileStream oldFileNamed: &#39;mbfs_skip.tst&#39;.<br>
file ascii.<br>
file contentsOfEntireFile.]<br>
        ensure: [file close.<br>
                FileDirectory default deleteFileNamed: &#39;mbfs_skip.tst&#39;].<br></div>
-&gt; &#39;Ceci doit chang?er&#39; &quot;Oops squeakly incorrect&quot;<div><br>
<br>
Ah Ah, MultiByteFileStream let us see a stream of encoded characters,<br>
but position over a stream of bytes...<br>
The only programmer choice is to put marks (by inquiring aMBFS<br>
position) and restore position using these marks...<br>
<br>
</div></blockquote>
<br>
Well, this part is broken, but the current fileIn/fileOut code relies on this bug/&quot;feature&quot;, otherwise it would be easy to fix it in the utf8 case.<br>
Actually I was thinking about CompiledMethod &gt;&gt; #getPreambleFrom:at: or even worse PositionableStream &gt;&gt; #backChunk.</div></blockquote><div><br></div><div>On a tangental note one can save significant time by having StandardSourceFilesArray cache read-only copies instead of creating new ones all the time.  Find a change set attached that we use at Teleplace.  You might find more places to use this than I have.</div>


</div></blockquote><div><br></div></div><span style="font-family:arial, sans-serif;font-size:medium;border-collapse:collapse"><div style="font-size:13px;padding-left:4px;padding-bottom:3px;padding-right:0px">
<table cellpadding="0" style="border-collapse:collapse;margin-top:0px;width:auto"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif;text-align:left;white-space:nowrap;padding-right:8px;vertical-align:top;width:411px;padding-top:0px">


<table cellpadding="0" style="border-collapse:collapse;table-layout:fixed;width:411px"><tbody><tr><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif">
<div style="overflow-x:hidden;overflow-y:hidden;white-space:nowrap"><h3 style="font-size:13px;font-weight:bold;white-space:nowrap;display:inline;vertical-align:top;color:rgb(0, 104, 28)">
<span>Henrik Johansen</span></h3> <span style="vertical-align:top">to <span style="vertical-align:top">me</span></span></div></td></tr></tbody></table></td>
<td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif;text-align:right;white-space:nowrap;vertical-align:top"><div style="padding-top:0px;padding-right:4px">
<span style="color:rgb(132, 170, 255);text-decoration:underline;vertical-align:top">show details</span> <span title="Tue, Dec 8, 2009 at 11:42 AM" alt="Tue, Dec 8, 2009 at 11:42 AM" style="vertical-align:top;margin-right:3px">11:42 AM (20 minutes ago)</span> <span><img src="https://mail.google.com/mail/images/cleardot.gif" title="RemoteString-text.st" alt="" style="margin-top:0px;vertical-align:top;background-repeat:no-repeat;background-color:initial;width:15px;min-height:15px"></span></div>


</td><td style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial, sans-serif;text-align:right;white-space:nowrap;vertical-align:top"></td></tr></tbody></table>
</div><div style="min-height:0px;overflow-x:hidden;overflow-y:hidden;clear:both"></div><div></div><div></div><div style="font-size:13px;margin-top:5px;margin-right:15px;margin-bottom:5px;margin-left:15px;padding-bottom:20px">

<div>
&gt;&gt;On a tangental note one can save significant time by having StandardSourceFilesArray cache read-only copies instead of creating new ones all the time.  Find a change set attached that we &gt;&gt;use  at Teleplace.  You might find more places to use this than I have.<br>


<br></div>I&#39;m not subscribed to SqueakDev, but here&#39;s one worthwhile addition:<br><br><br><br><br>Benchies:<br>[CompiledMethod allInstances collect: [:each | each getSource] ] timeToRun<br><br><br>With caching: 17344<br>


Without caching:  25721<br><br>Cheers,<br></div></span><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Henry</span></div></div></blockquote><div><br></div><div>but beware...</div>

<div> </div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; color: rgb(80, 0, 80); ">On Tue, Dec 8, 2009 at 12:09 PM, Henrik Johansen <span dir="ltr">&lt;<a href="mailto:henrik.s.johansen@veloxit.no" target="_blank" style="color: rgb(0, 0, 204); ">henrik.s.johansen@veloxit.no</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div style="word-wrap: break-word; "><div>[snip]</div><div><br></div><div>I just noticed that for some reason, it seems to screw up accepting new versions of old methods...</div><div><br></div><div>Need more time to check out why, yay.</div>
</div></blockquote><div> </div></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"></span> </div>


<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Making something simple out of current MultiByteFileStream mess is a<br>
challenge I don&#39;t even want to take, but you seem a but tougher than<br>
me.<br>
<br>
</blockquote>
<br></div>
I think the current performance of MultiByteFileStream is acceptable for general use. According to my measurements the greatest bottleneck is WriteStream &gt;&gt; #nextPut: for typical operations.<br><font color="#888888">
<br>
<br>
Levente</font><div><div></div><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers<br>
<br>
Nicolas<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Levente<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cheers<br>
<br>
Nicolas<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</blockquote>
</div></div><br><br>
<br></blockquote></div></div><br>
</blockquote></div></div><br>
</blockquote></div><br>