REST BAQ call is quite slow?

I’m calling a relatively simple BAQ via REST API and it’s taking consistently 3 seconds to return results.

The same query in the BAQ editor returns results much faster:

Any idea why this performance difference?
I have noticed it with certain other simple queries as well, whereas if I call one that returns thousands of rows and 5 columns, it executes in like .7 seconds? very odd

Is tehre a lot of content? Maybe the parsing / serializing to JSON is consuming the time?

Not really, it’s only returning like 5-12 columns and only a few rows

Read this


Sounds like because it’s a baq, the model is not cached and has to be regenerated for each call, which is why it takes longer for REST rather than the designer, where it may be cached?

1 Like

Upgrade to or greater. This was addressed in that release


I’m on, so that would help to explain it :slight_smile:

NO, cache is not implemented yet, but probably BAQ part work faster in the latest release.

Sounds like I need to actually make the effort to upgrade then :slight_smile: Thanks Olga!

@Aaron_Moreng what tool is that in your first screenshot?

Hey jeff that’s a screenshot from postman

Ah ok. Have you tried executing the rest call locally in your environment and throwing a stopwatch on it?

Ain’t nobody got time for that :wink: jk but it’s essentially running locally against the server so it’s not going out over the internet or anything. Sounds like it’s fixed in a higher version than I have

I’m still on Is that likely why CustomerSvc.GetByID takes a whopping 15 seconds to return one row?

CustomerSvc.GetByID is not a BAQ call, so the issue discussed before is not applicable. For services model is cached on the first call after application pool started and then reused.