cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP API V2 - very long response times

SOAP API V2 - very long response times

I'm testing the soap v2 api magento to use them on a management .NET my test is based in php

 

LINK TEST

 

<?php
    $time_start     = microtime(true);
    $address = "http://YOURDOMAIN.XXX/index.php/api/v2_soap/?wsdl";
    $client = new SoapClient($address);
      
    //Login
    $sessionId        = $client->login("USERxxx", "ApiKeyxxx"); 
    $complexFilter = array(
        'complex_filter' => array(
            array(
                'key' => 'type',
                'value' => array('key' => 'in', 'value' => 'simple,configurable')
            )
        )
    );
    $result = $client->catalogProductList($sessionId, $complexFilter);
    
        // Product List here...
        echo '<h1>List of products via API-SOAP V2 WSDL</h1>';
    echo '<h3>Address: '.$address.'</h3>';
    echo '<h4>sessionID api: '.$sessionId.'</h4>';
    echo '<hr>';
    echo '<ul>';
    
        for($i=0; $i<count($result); $i++){
        echo  '<li style="list-style:decimal;">'.$result[$i]->sku.'<br/>'.$result[$i]->name.'</li>';
        }
        echo '</ul><hr>';
    
    
    echo '<h3>Time in seconds: '.(microtime(true) - $time_start).'</h3>';
     //var_dump($result, (microtime(true) - $time_start));
       
      
    ?>

 

 

But 15 seconds they seem to have exaggerated the result of a small number of products. Anyone knows how to speed it up? Given that enabling the WSDL cache I reduced to about 10 seconds (24 to 15)