<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-10-05 20:36 GMT+02:00 Hugues Peccatte <span dir="ltr"><<a href="mailto:hugues.peccatte@gmail.com" target="_blank">hugues.peccatte@gmail.com</a>></span>:<br><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"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">2014-10-04 9:01 GMT+02:00 Hugues Peccatte <span dir="ltr"><<a href="mailto:hugues.peccatte@gmail.com" target="_blank">hugues.peccatte@gmail.com</a>></span>:<br><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">Le 4 oct. 2014 03:22, "Madhura Jayaratne" <<a href="mailto:madhura.cj@gmail.com" target="_blank">madhura.cj@gmail.com</a>> a écrit :</p><div><div><br>
><br>
><br>
><br>
> On Sat, Oct 4, 2014 at 1:24 AM, Hugues Peccatte <<a href="mailto:hugues.peccatte@gmail.com" target="_blank">hugues.peccatte@gmail.com</a>> wrote:<br>
>><br>
>> 2014-10-03 12:26 GMT+02:00 Marc Delisle <<a href="mailto:marc@infomarc.info" target="_blank">marc@infomarc.info</a>>:<br>
>>><br>
>>> Hi Hugues,<br>
>>> I retested this morning on a laptop, importing a SQL file containing<br>
>>> 10000 employees from the sample employees database. This is a small file<br>
>>> (660 KB).<br>
>>><br>
>>> Current master: 3 min 25 sec (and ends with JSON.parse: unexpected<br>
>>> character)<br>
>>><br>
>>> Current Tithugues/stringFunctions_master: 2 min 10 sec (same js error)<br>
>>><br>
>>> Current QA_4_2: 0 min 5 sec<br>
>>><br>
>>> There has been improvement, but we cannot release 4.3 with this import<br>
>>> speed.<br>
>>><br>
>>> --<br>
>>> Marc Delisle | phpMyAdmin<br>
>><br>
>><br>
>> Hi,<br>
>><br>
>> I agree… But I'm afraid this is linked to multibytes functions… <br>
>> Maybe we shouldn't use the multibytes functions everywhere…<br>
>><br>
>> I'll still try to improve performances.<br>
>><br>
>> Hugues.<br>
>><br>
><br>
> Indeed, I also think that we should use mb_* function only when necessary and choice to use them should be made in case by case basis.<br>
><br>
> -- <br>
> Thanks and Regards,<br>
><br>
> Madhura Jayaratne</div></div><p></p>
<p dir="ltr">Hi, </p>
<p dir="ltr">I didn't push my commits, but that's what I've started. I replaced the mb_* calls by standard calls on configuration variables, reserved words, etc.</p><span><font color="#888888">
<p dir="ltr">Hugues.</p></font></span></blockquote><div><br></div></div></div><div>Hi,</div><div><br></div><div>Out of desperation, I try another algorithm. Instead of buffering data until SQL delimiter, I'll try to parse all lines.</div><div>So, I won't parse 1000 times a buffer of 50000 characters, but less than 10 times many buffers of 500 characters. I hope this will be faster.</div><span class=""><font color="#888888"><div><br></div><div>Hugues.</div></font></span></div></div></div>
</blockquote></div><br></div><div class="gmail_extra">Hi,</div><div class="gmail_extra"><br></div><div class="gmail_extra">The new algorithm is over. There are still some controls to add, but it is usable with the file in this ticket: [1]</div><div class="gmail_extra">You can find my modifications here: [2]<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Marc, is it faster for you ?</div><div class="gmail_extra">It seems that I won ~33% of time. We're still far from 5 seconds…</div><div class="gmail_extra">Maybe I'll try to use standard PHP functions to see the difference. If the standard PHP functions are really faster, I'll try to add an option to use mb_* functions or standard PHP functions, as you said.</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1] <a href="https://sourceforge.net/p/phpmyadmin/bugs/4536/">https://sourceforge.net/p/phpmyadmin/bugs/4536/</a><br></div><div class="gmail_extra">[2] <a href="https://github.com/Tithugues/phpmyadmin/tree/stringFunctions_useStandardFunctions_master">https://github.com/Tithugues/phpmyadmin/tree/stringFunctions_useStandardFunctions_master</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra">Hugues.</div></div>