<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 Oct 2014, at 21:01, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" class="">eliot.miranda@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Hi Phil,<div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Oct 15, 2014 at 10:11 PM,<span class="Apple-converted-space">&nbsp;</span><a href="mailto:phil@highoctane.be" class="">phil@highoctane.be</a><span class="Apple-converted-space">&nbsp;</span><span dir="ltr" class="">&lt;<a href="mailto:phil@highoctane.be" target="_blank" class="">phil@highoctane.be</a>&gt;</span><span class="Apple-converted-space">&nbsp;</span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">&nbsp;<br class=""><p dir="ltr" class="">How to include aioplugin in pharovm?</p></blockquote><div class=""><br class=""></div><div class="">Ask Esteban and other members of the Pharo team.&nbsp; The AioPlugin is already included in the Squeak Cog and Interpreter VMs.&nbsp; Since the build process is different for Pharo (CMake and VMMakerConfigurqation (sp?) based) telling you how my builds work won't help.&nbsp; But if you want you could try and use one of the latest VMs from my website (see the Downloads link) and you should find that'll work as a Pharo VM.</div></div></div></div></div></blockquote><div><br class=""></div><div>AioPlugin is since always in the mac version of the Pharo VM.&nbsp;</div><div>I don’t know why is not in the others, but my best guess is because I was not maintaining them at the time and when I took over I didn’t revised the process :P</div><div>I will see what I can do :)</div><div><br class=""></div><div>Esteban</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""><br class=""></div><div class=""><br class=""></div><div class="">HTH</div><div class="">Eliot</div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><p dir="ltr" class="">See messages below for the reason why.</p><p dir="ltr" class="">Phil</p><div class="gmail_quote">---------- Message transféré ----------<br class="">De : "David T. Lewis" &lt;<a href="mailto:lewis@mail.msen.com" target="_blank" class="">lewis@mail.msen.com</a>&gt;<br class="">Date : 16 oct. 2014 01:30<br class="">Objet : Re: [Pharo-dev] OSProcess in 3.0<br class="">À : "Pharo Development List" &lt;<a href="mailto:pharo-dev@lists.pharo.org" target="_blank" class="">pharo-dev@lists.pharo.org</a>&gt;<br class="">Cc&nbsp;:<span class="Apple-converted-space">&nbsp;</span><br class=""><br type="attribution" class="">On Tue, Oct 14, 2014 at 09:35:44PM +0200, Thierry Goubier wrote:<br class="">&gt;<br class="">&gt;<br class="">&gt; Le 14/10/2014 14:15, David T. Lewis a ?crit :<br class="">&gt; &gt;On Tue, Oct 14, 2014 at 07:19:10AM +0200, Thierry Goubier wrote:<br class="">&gt; &gt;&gt;Hi Dave,<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;took me a while to do some testing. It seems there is an issue, but I<br class="">&gt; &gt;&gt;couldn't find out where. First, the data:<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;Loading a package from a local gitfiletree repository (get from the<br class="">&gt; &gt;&gt;command a zipped git archive containing the package) :<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;4.5.11, 4.6.8: 2132 msec.<br class="">&gt; &gt;&gt;4.5.12, 4.6.9: 50847 msec.<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;I tried to rewrite the main command, remove the closePipes, etc... No<br class="">&gt; &gt;&gt;change in the runtime, so your right.<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;Profiling doesn't help much: execution time is mostly idle time (but<br class="">&gt; &gt;&gt;with a significant increase on PipeableOSProcess commands: goes from<br class="">&gt; &gt;&gt;invisible to 2700 ms. A user break in the middle shows it delay waiting<br class="">&gt; &gt;&gt;on output of the external process).<br class="">&gt; &gt;&gt;<br class="">&gt; &gt;&gt;Only hint I could see is that it seems to be linked with the size of the<br class="">&gt; &gt;&gt;output of the command.<br class="">&gt; &gt;<br class="">&gt; &gt;Thierry,<br class="">&gt; &gt;<br class="">&gt; &gt;Aha! I am quite sure that you have located the problem. There must be<br class="">&gt; &gt;something preventing the OS process from running to completion with<br class="">&gt; &gt;a larger amount of output data. It definitely sounds like a bug in my<br class="">&gt; &gt;latest update to Pipeable OSProcess.<br class="">&gt;<br class="">&gt; The strange thing is that it runs to completion (i.e. I got no errors;<br class="">&gt; if any data was missing or corrupted on output, my load would fail); but<br class="">&gt; a lot slower than it should be.<br class="">&gt;<br class="">&gt; &gt;Thank you very much for finding this. I will get it fixed as quickly<br class="">&gt; &gt;as I can.<br class="">&gt;<br class="">&gt; Thanks. I'm unable to help you much, I'm afraid :(<br class=""><br class="">Thierry,<br class=""><br class="">I do not yet have a solution to this, but I have been able to confirm<br class="">that the performance difference that you see is primarily associated with<br class="">the AioPlugin not being present in your VM.<br class=""><br class="">When I changed PipeableOSProcess to handle pipe handle closing properly,<br class="">I used a buffered output stream that is driven by aio events. When data<br class="">is available to be read from the external OS process, an aio notification<br class="">pulls the available data into the buffered stream, and when no more data<br class="">is available, the pipe (file) handles are closed.<br class=""><br class="">If the plugin is not present in the VM, I provided a polling mechanism<br class="">to read data from the external OS process. Apparently this is very<br class="">inefficient, and I am sure it could be greatly improved. That is the<br class="">cause of the extremely slow performance that you are seeing.<br class=""><br class="">So in summary: The enhancement to PipeableOSProcess relies on an aio<br class="">event driven reader, and if the AIO plugin is missing, the fallback code<br class="">relies on polling, and is horribly inefficient.<br class=""><br class="">More to follow, and thank you again for identifying the problem.<br class=""><br class="">If you can convice your VM vendor to include AioPlugin in your VM, that<br class="">would be helpful also ;-)<br class=""><br class="">Dave<br class=""><br class=""><br class=""></div><br class=""></blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space">&nbsp;</span><br class="">best,<div class="">Eliot</div></div></div></div></blockquote></div><br class=""></body></html>