Jump to content


Photo

API performance

api performance slow

  • Please log in to reply
4 replies to this topic

#1 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 20 May 2014 - 03:07 PM

Hi all,

I'm still not sure how to improve the performance of the API.

Here's the curl_getinfo for returning 50 accounts.

It's connecting in 0.002 seconds then taking 8 second before beginning to return the data.

Any ideas would be greatly appreciated!

Martin

Array
(
    [url] => http://localhost/crm/app/index.php/accounts/account/api/list/filter/pagination%5Bpage%5D=1&pagination%5BpageSize%5D=50
    [content_type] => text/html
    [http_code] => 200
    [header_size] => 512
    [request_size] => 291
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 8.623946
    [namelookup_time] => 4.6E-5
    [connect_time] => 0.002095
    [pretransfer_time] => 0.00217
    [size_upload] => 0
    [size_download] => 46519
    [speed_download] => 5394
    [speed_upload] => 0
    [download_content_length] => -1
    [upload_content_length] => 0
    [starttransfer_time] => 8.205764
    [redirect_time] => 0
    [certinfo] => Array
        (
        )


    [primary_ip] => ::1
    [primary_port] => 80
    [local_ip] => ::1
    [local_port] => 52609
    [redirect_url] => 
)


#2 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 21 May 2014 - 09:08 AM

I tried changing the pageSize to 1 and took 1 second, then I upped it to 2 and it took about 1.3 seconds. So it's something really slow in returning each result from the database.

Is there anything I can do with database indexing?

Also, I have memcache running.



#3 miek1123

miek1123

    Member

  • Members
  • PipPip
  • 19 posts

Posted 22 May 2014 - 02:54 PM

Does performance change on subsequent calls (without cache resets) or does it stay relatively static?  

 

How many total accounts do you have?   If this is a test system, can you decrease the total # of accounts in the database (delete records) and see if that affects performance?  

 

I think that'll help narrow down the cause.



#4 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 23 May 2014 - 09:02 AM

Hi Miek!

It stays relatively static between about 7 and 8 seconds for 50 accounts, regardless of how many times I refresh.

I only have about 85 in total, also my local copy has 55 and the live server has 85 and they both take the same time to return 50.

They are both MAMP setups, I don't know if that has something to do with it, but all my other API systems are lightning fast.

Thanks for the response! It's really baffling me.



#5 mledwards

mledwards

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 23 September 2014 - 09:04 AM

I'm still completely stumped by this. A simple report filtered by 1 user can take anything up to 30 seconds to load.







Also tagged with one or more of these keywords: api, performance, slow

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users