<div dir="ltr"><div>I've thought about going directly to the tables, yes. My concern is that web services do all the checks and other behind-the-scenes things I might not know to do. I could update vtiger_contact, but what about the seemingly unrelated table that may or may not get updated at the same time? I'd never know exactly what steps are taken by web services, at least not without a great deal of time spent tracing the web services code.<br><br></div>A CSV import is my other option. I assumed that 20,000 records would take just as long with that method as with web services, since both take a similar approach. At least, I'm guessing they do. Plus, I've not looked into automating a CSV import, and I'm not sure if there's a way to handle duplicates and such automatically. This would need to be a cron job, not something I'd do manually. Do you think this would be a viable route for my purposes?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 23, 2018 at 4:18 PM, Chris Thompson <span dir="ltr"><<a href="mailto:cthompson@moderas.org" target="_blank">cthompson@moderas.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="white" link="blue" vlink="purple" lang="EN-US"><div class="m_6076735630117116366WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Have you considered NOT coding this?  Seems to me a properly formatted export of your data could be imported into your application anynumberof ways and would be significantly faster and not bog your application down.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><<a href="mailto:vtigercrm-developers-bounces@lists.vtigercrm.com" target="_blank">vtigercrm-developers-bounces@<wbr>lists.vtigercrm.com</a>> on behalf of Alex Hall <<a href="mailto:ahall@autodist.com" target="_blank">ahall@autodist.com</a>><br><b>Reply-To: </b><<a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.<wbr>vtigercrm.com</a>><br><b>Date: </b>Monday, April 23, 2018 at 3:56 PM<br><b>To: </b><<a href="mailto:vtigercrm-developers@lists.vtigercrm.com" target="_blank">vtigercrm-developers@lists.<wbr>vtigercrm.com</a>><br><b>Subject: </b>[Vtigercrm-developers] Speeding up web services sync script?<u></u><u></u></span></p></div><div><div class="h5"><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><div><p class="MsoNormal">Hello all,<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">I have a script in PHP that runs once a day, in the morning. This script queries the AS400 that stores all our company data, retrieving a list of all the organizations and their contacts. There are a little under 13,000 of them, with anywhere from 0 to 2 contacts per organization. Call it 20,000 web service calls total. It then loops through these records, using web services to create or update each organization or contact in Vtiger. Obviously, this is slow.<u></u><u></u></p></div><p class="MsoNormal">My question is whether there's anything I can do to speed it up. It takes hours now, and often times out before it completes all the records. I'm considering rewriting it in Python or another language that can handle multi-threading, but I don't know if that's the best way. Are there any ways to speed up web services? Any tips on using some method over another because that method is faster, for instance? Are there any server settings I might try that would give web services more resources to run faster? Thanks for any advice.<br clear="all"><u></u><u></u></p><div><div><div><div><p class="MsoNormal"><br>-- <u></u><u></u></p><div><div><div><div><p class="MsoNormal">Alex Hall<u></u><u></u></p></div><p class="MsoNormal">Automatic Distributors, IT department<u></u><u></u></p></div><p class="MsoNormal"><a href="mailto:ahall@autodist.com" target="_blank">ahall@autodist.com</a><u></u><u></u></p></div></div></div></div></div></div></div></div></div><p class="MsoNormal">______________________________<wbr>_________________ <a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><u></u><u></u></p></div></div>
<br>______________________________<wbr>_________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Alex Hall<br></div>Automatic Distributors, IT department<br></div><a href="mailto:ahall@autodist.com" target="_blank">ahall@autodist.com</a><br></div></div>
</div>