[Phpmyadmin-devel] #4536 - master: import problem (PMA_String)

Madhura Jayaratne madhura.cj at gmail.com
Wed Sep 24 18:32:33 CEST 2014


On Wed, Sep 24, 2014 at 9:10 PM, Hugues Peccatte <hugues.peccatte at gmail.com>
wrote:

> 2014-09-24 14:42 GMT+02:00 Chirayu Chiripal <chirayu.chiripal at gmail.com>:
>
>> On Wed, Sep 24, 2014 at 5:54 PM, Madhura Jayaratne <madhura.cj at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Wed, Sep 24, 2014 at 5:35 PM, Marc Delisle <marc at infomarc.info>
>>> wrote:
>>>>
>>>>
>>>> In the current implementation, the mb_* functions are preferred; so we
>>>> would use the same priority, to define functions like PMA_substr().
>>>
>>>
> Ok. I'll try to do this.
>
>
>>
>>> For what it's worth I did some profiling of the import functionality and
>>> here is what I observed.
>>>
>>
> It's worth it!
>
>
>>
>>> If we consider the substring functionality
>>>
>>> Using the native functions wrapped in OOP function calls,
>>> php::substr took 0.34 micro secs on average (2.7ms for 8308 calls)
>>> PMA_StringNative->substr took 13.26 micro secs on average (110ms for
>>> 8295 calls)
>>> PMS_String->substr took 28.93 micro secs on average (244ms for 8294
>>> calls)
>>>
>>> Using the mb functions wrapped in OOP function calls,
>>> php::mb_substr took 22 micro secs on average (220ms for 9700 calls)
>>> PMA_StringMB->substr took 120.54 micro secs on average (1170ms for 9706
>>> calls)
>>> PMS_String->substr took 115.50 micro secs on average (958ms for 8294
>>> calls)
>>>
>>> So it seems like both factors (using mb functions as well as object
>>> orientation) are responsible for the slowness.
>>>
>>
> Yes, we know than both makes the script slower. OOP can be avoided, but I
> don't think that we could avoid using mb functions. So this is our minimal
> constraint.
>
>
>>
>>> See the attached screenshots too.
>>>
>>
> I don't know this tool! What is it please? This seems to be very useful,
> at least for the benchmark I try to do currently.
>
>>
>> I used Xdebug profiler to profile and WinCacheGrind for Windows to
analyze the profiling report. KCacheGrind can be used in Linux
environments. More details can be found at [1].

[1] http://www.xdebug.org/docs/profiler

-- 
Thanks and Regards,

Madhura Jayaratne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20140924/4d92b2bd/attachment.html>


More information about the Developers mailing list