<br><br><div class="gmail_quote">On Tue, Jul 5, 2011 at 11:46 PM, Alain Rastoul <span dir="ltr">&lt;<a href="mailto:alr.dev@free.fr">alr.dev@free.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>





<div bgcolor="#ffffff">
<div><font face="Arial" size="2">Hi  Mariano,</font></div>
<div><font face="Arial" size="2">I don&#39;t want to do multi threading with sqlite 
because I know it doesn&#39;t work.</font></div>
<div><font face="Arial" size="2">I was curious about the squeakdbx (or opendbx 
architecture) because of the not so good performance and the time spent in 
waiting , </font><font face="Arial" size="2">I do not understand the squeakdbx 
package vs opendbx package: the doc is mentioning a squeakdbx plugin dll but I 
have no squeakdbx dll ? </font></div></div></blockquote><div><br>Sorry. THat&#39;s outdated. Once (2 years ago) Esteban Lorenzano tried to write a plugin to avoid FFI. The idea was that such plugin could avoid locking the VM. But I don&#39;t remember why we didn&#39;t succeded. <br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#ffffff">
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">You are saying that in that case the external 
call is counted on the InputEventPollingFetcher&gt;&gt; wait and not in 
primitives (?).</font></div></div></blockquote><div><br><br>maybe :)  but I don&#39;t know<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font face="Arial" size="2"><font face="Arial" size="2">I will investigate 
with FFI/SQlite and it should be the same (I&#39;ve seen some messages about 
incorrect profiling reports in primitives),</font></font></div>
<div> </div></div></blockquote><div><br>Yes, primitives are not really well measured in profilers. Check the new profiler announced by Eliot Miranda, it fixes this problem.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div>I expected much better performance with sqlite , and glorp is  very 
good (5% of the time), I would have expected the contrary.</div></div></blockquote><div><br>Sorry I didn&#39;t understand. <br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff">
<div> </div>
<div><font face="Arial" size="2">Thanks</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Cheers</font></div>
<div><font face="Arial" size="2">Alain</font></div>
<blockquote style="border-left:#000000 2px solid;padding-left:5px;padding-right:0px;margin-left:5px;margin-right:0px" dir="ltr">
  <div>&quot;Mariano Martinez Peck&quot; &lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt; 
  a écrit dans le message de <a href="news:CAA+-=mVV3zvPcFPm3UwtS11Y1ugxpCJi6pZxYpVJPZTfsDrrdQ@mail.gmail.com" target="_blank">news:CAA+-=mVV3zvPcFPm3UwtS11Y1ugxpCJi6pZxYpVJPZTfsDrrdQ@mail.gmail.com</a>...</div><br><br>
  <div class="gmail_quote"><div><div></div><div class="h5">On Tue, Jul 5, 2011 at 10:50 PM, Alain Rastoul <span dir="ltr">&lt;<a href="mailto:alr.dev@free.fr" target="_blank">alr.dev@free.fr</a>&gt;</span> wrote:<br>
  <blockquote style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex" class="gmail_quote">Hi,<br>(sorry for sending this mail again, my pc was off 
    for a long time and the<br>message was dated from 2007, people who sort 
    their messages would not see<br>it)<br><br>I&#39;ve done a small program in 
    Pharo 1.3 with glorp+opendbx that insert 1000<br>rows in a customer table in 
    a sqlite db.<br>The 1000 insert takes 140 sec (very slow), but the Pharo 
    profiler says that<br>it spend 95%<br>of the time waiting for input.<br>(in 
    InputEventPollingFetcher&gt;&gt; waitForInput)<br>I was wondering if the 
    queries are executed in another thread than the vm<br>thread 
?<br></blockquote>
  <div><br>Hi Alain. No. Squeak/Pharo&#39;s thread architecture is the so called 
  green thread, that is, only ONE OS thread is used. Internally, the language 
  reifies Process, Scheduler, #fork: , etc etc etc. But from the OS point of 
  view there is only one thread for the VM. So.....the regular FFI blocks the 
  VM. What does it mean? that while the C function called by FFI is being 
  executed, the WHOLE VM is block. Notihgn can happen at the same time. Imagine 
  the function that retrieves the results and needs to wait for 
  them.....TERRIBLE. So...if the backend does not support async quieries, then 
  you are screw and dbx may be slow in Pharo. Nothing to do. <br><br>However, 
  some backends support async queries, and opendbx let us configure this. This 
  is explained in: <br><a href="http://www.squeakdbx.org/Architecture%20and%20desing?_s=FlIhkPQOOFSlqf8C&amp;_k=j-3_7Kw_&amp;_n&amp;18" target="_blank">http://www.squeakdbx.org/Architecture%20and%20desing?_s=FlIhkPQOOFSlqf8C&amp;_k=j-3_7Kw_&amp;_n&amp;18</a><br>
where 
  it says &quot;External call implementation&quot;<br><br>You can see the list of backends 
  that support async queries in here: <br><a href="http://www.squeakdbx.org/documentation/Asynchronous%20queries?_s=FlIhkPQOOFSlqf8C&amp;_k=j-3_7Kw_&amp;_n&amp;17" target="_blank">http://www.squeakdbx.org/documentation/Asynchronous%20queries?_s=FlIhkPQOOFSlqf8C&amp;_k=j-3_7Kw_&amp;_n&amp;17</a><br>
<br>Notice 
  that there is some room for improvements, but we didn&#39;t have time so far. 
  Hernik told us some good ideas. But since we didn&#39;t need more power so far we 
  couldn&#39;t find time to integrate his ideas. I am forwarding now the emails to 
  the mailing list. If you can take a look and provide code, it would be 
  awesome. Basically, it improves how and how much we wait in each side: image 
  and opendbx.<br><br>Finally, notice that Eliot is working in a multithreared 
  FFI for Cog, but it is not yet available as far as I know. 
  <br><br>Cheers<br><br>Mariano<br><br></div>
  </div></div><blockquote style="border-left:rgb(204,204,204) 1px solid;margin:0pt 0pt 0pt 0.8ex;padding-left:1ex" class="gmail_quote"><div><div></div><div class="h5">(I thought I&#39;ve seen a document about opendbx architecture 
    but could&#39;nt find<br>it on the 
    site).<br><br>TIA<br>Alain<br><br><br><br>------------------------------------------------------------------------------<br>All 
    of the data generated in your IT infrastructure is seriously 
    valuable.<br>Why? It contains a definitive record of application 
    performance, security<br>threats, fraudulent activity, and more. Splunk 
    takes this data and makes<br>sense of it. IT sense. And common sense.<br><a href="http://p.sf.net/sfu/splunk-d2d-c2" target="_blank">http://p.sf.net/sfu/splunk-d2d-c2</a><br>_______________________________________________<br>
libopendbx-devel 
    mailing list<br></div></div><a href="mailto:libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" target="_blank">libopendbx-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org</a><div class="im"><br>
<a href="https://lists.sourceforge.net/lists/listinfo/libopendbx-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/libopendbx-devel</a><br><a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX" target="_blank">http://www.linuxnetworks.de/doc/index.php/OpenDBX</a><br>
</div></blockquote></div><div class="im"><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>
  </div><p>
  </p><hr><div class="im">

  <p></p>------------------------------------------------------------------------------<br>All 
  of the data generated in your IT infrastructure is seriously valuable.<br>Why? 
  It contains a definitive record of application performance, security 
  <br>threats, fraudulent activity, and more. Splunk takes this data and makes 
  <br>sense of it. IT sense. And common 
  sense.<br><a href="http://p.sf.net/sfu/splunk-d2d-c2" target="_blank">http://p.sf.net/sfu/splunk-d2d-c2</a>
  <p>
  </p><hr>

  <p></p><p></p></div><p></p></blockquote></div>
<br>------------------------------------------------------------------------------<br>
All of the data generated in your IT infrastructure is seriously valuable.<br>
Why? It contains a definitive record of application performance, security<br>
threats, fraudulent activity, and more. Splunk takes this data and makes<br>
sense of it. IT sense. And common sense.<br>
<a href="http://p.sf.net/sfu/splunk-d2d-c2" target="_blank">http://p.sf.net/sfu/splunk-d2d-c2</a><br>_______________________________________________<br>
libopendbx-devel mailing list<br>
<a href="mailto:libopendbx-devel@lists.sourceforge.net">libopendbx-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/libopendbx-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/libopendbx-devel</a><br>
<a href="http://www.linuxnetworks.de/doc/index.php/OpenDBX" target="_blank">http://www.linuxnetworks.de/doc/index.php/OpenDBX</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>