Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SOAP V1 / V2 - Create/Update article speed problem
 
NikkiNikk
Jr. Member
 
Total Posts:  6
Joined:  2012-11-26
 

Hello!

Im very new to the Magento World and i started to build a PHP applikation to export ERP data (XML) into a Magento Shop.
My scripts works already, but very very very slow. So, i have a few questions to speed everything up!

I have a bunch of simple test articles, and, the workflow is (after building them with the xml data) for every single article:

try to update the article, if the article cannot be created (exception is thrown ..) try to create it.

So, my dilemma is, that a multicall would be better, but i have to check each article, if the article is already saved - update it, or the article is not available - create it.

My 20 test articles need about 40 seconds with a SOAP V1 connection, and over 60 seconds with a SOAP V2 connection (yes, only a different path to the V2 slows the scripting down! anybody knows why? ... (

Any help would be awesome! smile
Hope to hear something from you smile

Greetings!
Niklas

 
Magento Community Magento Community
Magento Community
Magento Community
 
NikkiNikk
Jr. Member
 
Total Posts:  6
Joined:  2012-11-26
 
VanquishSBS - 03 December 2012 02:43 AM

Use V1, not V2, V2 is for specific scenarios and not for standard product updates. Yes, it is slow without an optimized server or if you have a large number of categories/products, you can speed it up by changing indexing to manual update.

Hey Vanquish, thank you very much for your answer!
Ok, so i have to use the V1 to gain more speed.

I found this way to turn the auto index off, and after the import, to start it manually:

$processes Mage::getSingleton('index/indexer')->getProcessesCollection();
$processes->walk('setMode', array(Mage_Index_Model_Process::MODE_MANUAL));
$processes->walk('save');
// Here goes your
// Importing process
// ................
$processes->walk('reindexAll');
$processes->walk('setMode', array(Mage_Index_Model_Process::MODE_REAL_TIME));
$processes->walk('save');

The first step works (to shut the automatic index off), but the second doesnt.
Do you have another way to stop the auto index, and start the index after passend the import code?

Thank you very much for helping!
The versionswitch from V2 to V1 changed to speed to an half of it.

Greetings!
Niklas

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mirasvit
Guru
 
Avatar
Total Posts:  639
Joined:  2009-08-22
 

Hello!!
You can increase backend performance using asynchronous reindex extension. Check this one Fast Asynchronous Re-indexing http://mirasvit.com/magento-extensions/magento-asynchronous-reindex.html

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top