[Vtigercrm-developers] Creating Contact records via code. Timing results...

Jonathan Sardo sardoj at gmail.com
Thu Dec 4 11:49:00 GMT 2014


Alan, is this fast result because you launched save with WebService AFTER
normal save ?
Maybe the first one puts something in cache?
It would be interesting to launch normal save again to see if it is faster
than before...

Regards,

Jonathan SARDO
[image: Images intégrées 5]
Tél. 06 99 45 50 47

2014-12-04 10:35 GMT+01:00 Alan Bell <alan.bell at libertus.co.uk>:

> I was curious because web services must call the regular save operation,
> so should be an overhead, not an optimisation . . .
>
> this is the code in include/webservices/VtigerCRMObject.php in the Create
> function
>
>                 $adb->startTransaction();
>                 $this->instance->Save($this->getTabName());
>                 $error = $adb->hasFailedTransaction();
>                 $adb->completeTransaction();
>                 return !$error;
>
> So it does call the normal save operation. I think that wrapping the save
> in a transaction means it does the updates to all the entity tables in one
> hit and reduces the database locks a lot.
>
> would be interesting to do some performance testing without the
> transaction in the webservices code, and adding a transaction wrapper
> around the save method in the non-webservice code.
>
> Alan.
>
>
> On 04/12/14 09:24, Alan Lord wrote:
>
>> On 04/12/14 08:55, socialboostdk wrote:
>>
>>> Almost unbelievably fast..?
>>>
>>
>> Yes, I was amazed too. But both tests ran on the same server, using the
>> same database and the same code apart from the save method itself...
>>
>> Al
>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141204/71c501f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 4223 bytes
Desc: not available
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20141204/71c501f0/attachment.png>


More information about the vtigercrm-developers mailing list