API speed

Is anybody else experiencing unusual slowness when using the API? Even when we are pulling information for a single course on the "minimal" setting, it is taking us an unusually long amount of time to get this information.

Could the fact that we now have twice as many courses on our iTunes U site as we did a year ago be responsible for the diminished performance? Since we are specifying a single handle to pull information for, I would think that the number of courses would be irrelevant--it's not like we are grabbing the entire tree, just the information for a single course.

Is anybody else having this issue?

Posted on Mar 11, 2009 5:02 PM

Reply
7 replies

Mar 12, 2009 3:03 PM in response to PunditPending

When you use the ShowTree directive with a specific handle, you are still grabbing that part of the tree that gets you to that handle ... you're getting all the intermediary nodes. When you specify "minimal", "mostly", or "maximal" results, you're basically filtering node elements. In effect, Apple is sending you XPath results. Although it has loads of optimizations, XPath deals in whole XML trees ... so yes, the bigger your tree ("site") is, the slower the web service will feel.

However, I'm willing to bet that any slowness in how the web service feels has more to do with network latency or some other factor. Even very large sites will only have a limited number of nodes (< 10,000) and will only constitute a few hundred kilobytes of XML data ... and iTunes U sites have limited depth. If it's something on Apple's end, the likely reason is not the size of your site, rather the number of requests hitting Apple at the time, all sites considered. If you had, say, 100 courses and increased that to 200 courses, I doubt the web service would be significantly slower.

Still, it is possible that Apple might not be able to return results in a timely way. If so, you will get a response from the web service that says which requests went unfulfilled ...

<div class="jive-quote">From the Admin Guide:

In order to return a timely response, iTunes U may not process all of the requests in your
web service document. If this occurs, iTunes U returns a message with the response
indicating which operations were not processed.

Mar 19, 2009 5:07 PM in response to richwolf

Rich,

As a comparison, do you know the exact size of the XML for your site (and approximately how many courses you have)? I think I remember our developer telling me that the XML on "Mostly" was close to or exceeding 1-2MB. I am checking back with him to find out, but I would like to have some comparison.

I agree that the issue is probably network latency, but right now it is taking so long that it is problematic and I would like to rule out issues specific to our site.

Mar 19, 2009 6:33 PM in response to PunditPending

Yes, but the instructors involved went group-crazy. I've basically got a situation where there is one "course" (1st year medicine) and about fifteen groups in that course. I'm probably going to address the issue this summer ... try to reorganize things. But I'm letting things stand until the academic year is out.

But yes, compared to many of you, my iTunes U site is lame, lame, lame. It's been a real challenge to get faculty here excited about podcasting. Go figure. 🙂

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

API speed

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.