Performance: REST vs. cmd line

We’re working on some reporting, and have discovered that the REST interface for simple ticket queries is around 400x slower than using the command line interface. I wonder why this is, since I’d prefer to use the REST interface.

System: Linux Ubuntu 8.04 (hardy)
CPU: Core 2 Duo, 2.0GHz
RAM: 2GB
RT: 3.8.2
Config: Apache2, mod_perl, mysql
DBIx:SearchBuilder etc. are all up to date

Both command line and the curl/REST method are running on the same machine as RT (apache and the database). We already have the HTTP basic-auth session auth cookie for REST, so that’s not where the time’s going. Our apache server is fine for the other services it runs. The CLI takes milliseconds, but REST takes several seconds on average (with large variance).

Any idea where I should look for the bottleneck?

thanks,

– Gary Oberbrunner

We’re working on some reporting, and have discovered that the REST
interface for simple ticket queries is around 400x slower than using
the command line interface. I wonder why this is, since I’d prefer
to use the REST interface.

RT’s command line interface (bin/rt) uses the REST interface.

-kevin

From: “Kevin Falcone” falcone@bestpractical.com
To: rt-users@lists.bestpractical.com
Sent: Tuesday, January 11, 2011 10:41:51 AM
Subject: Re: [rt-users] performance: REST vs. cmd line

We’re working on some reporting, and have discovered that the REST
interface for simple ticket queries is around 400x slower than using
the command line interface. I wonder why this is, since I’d prefer
to use the REST interface.

RT’s command line interface (bin/rt) uses the REST interface.

I kept poking at it, and sure enough there were a couple of errors in our tests that were causing the supposed time differences. Now that those are fixed, the times are the same, as one would expect. Sorry for the trouble.

– Gary