thuphinguyen / php-dynamics-crm-2011

Automatically exported from code.google.com/p/php-dynamics-crm-2011
0 stars 0 forks source link

Webservice is painfully slow #45

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Run any query using the PHP Dynamics CRM Connector and the other libraries 
takes more than one minute. I would like to know if you have any information or 
documentation about this. Because I can't find it on the web. If I access 
directly to the CRM system instead of using the webservices, it is slow (5-10 
seconds to load a page) but not that much. It is 10 times slower using the 
Webservice. Maybe something in my PHP configuration is not ok? Any idea?

Original issue reported on code.google.com by juegoinf...@gmail.com on 15 Oct 2012 at 8:45

GoogleCodeExporter commented 9 years ago
The design of this library is admittedly a bit "heavy".  When fetching 
entities, the system actually does two separate queries - first it gets the 
entity definition, then it gets the entity data specified in the query.
This is both slow - on network traffic - and heavy on memory usage.  Not the 
best design, I admit, but I was more concerned about getting a "smart" object 
than speed...

The login step is also quite slow, as it must fetch and parse the WSDL to 
determine the correct URLs to use for login.

One thing to try is the "RetrieveMultipleRaw" method, which doesn't do the 
heavy parsing of data into "Entity" objects, but just uses a generic "Object" - 
this is usually faster and less memory intensive.

Can you separate your timings into "login time" and "query time"?

Original comment by N.M.Pr...@gmail.com on 17 Oct 2012 at 11:46