tripit / api

TripIt's API Documentation and Support Forum
http://www.tripit.com/developer
Other
47 stars 16 forks source link

Slow response times #267

Open hassanrehman opened 3 years ago

hassanrehman commented 3 years ago

Hi,

Our model checks in users to the locations they've been, while providing progress as we go. The response times from tripit are ridiculously slow for default pagination parameters. We have a timeout policy at 35 seconds which seems to be getting hit quite frequently. Any ideas? ... below are logs that show response times for each request:

29544 - 2021-06-15 00:30:54 UTC - 2021-06-15 00:31:19 UTC (24598ms) - {"page_no"=>1} 29593 - 2021-06-15 00:32:45 UTC - 2021-06-15 00:33:06 UTC (21175ms) - {"page_no"=>2} 29603 - 2021-06-15 00:33:18 UTC - 2021-06-15 00:33:33 UTC (14579ms) - {"page_no"=>3} 29613 - 2021-06-15 00:33:40 UTC - 2021-06-15 00:34:12 UTC (32393ms) - {"page_no"=>4} 29626 - 2021-06-15 00:34:15 UTC - 2021-06-15 00:34:36 UTC (20982ms) - {"page_no"=>5} 29646 - 2021-06-15 00:34:48 UTC - 2021-06-15 00:35:18 UTC (29883ms) - {"page_no"=>6} 29658 - 2021-06-15 00:35:27 UTC - 2021-06-15 00:35:46 UTC (18605ms) - {"page_no"=>7} 29675 - 2021-06-15 00:35:59 UTC - 2021-06-15 00:36:31 UTC (32009ms) - {"page_no"=>8} 29692 - 2021-06-15 00:36:44 UTC - 2021-06-15 00:37:07 UTC (22399ms) - {"page_no"=>9} 29700 - 2021-06-15 00:37:13 UTC - 2021-06-15 00:37:37 UTC (24395ms) - {"page_no"=>10} 29716 - 2021-06-15 00:37:42 UTC - - {"page_no"=>11}

tripit-ericvanl commented 3 years ago

What is the URL and all the parameters used for these calls. What is the client (os, version, language) invoking the calls. How many trips and trip plans is involved?

hassanrehman commented 3 years ago

I am using a Library for ruby, which obfuscates the urls being hit. The function called is tripit_user.trips(params) .. so i'm pretty sure there's an equivalent /trips endpoint on tripit API. Parameters are: include_objects: true, past: true, page_num: page_no

per_page is default .. to a 100

tripit-ericvanl commented 3 years ago

which version of ruby are you on?

hassanrehman commented 3 years ago

2.6.3

tripit-ericvanl commented 3 years ago

also if you could tell me the tripit api id you are using. its the id provided on the https://www.tripit.com/developer/create page(there should be a left column list of apps you've created, selecting it will show the api info (this is where you would have found your consumer key/secret to use on the api calls)