Do advanced filters occur on the server or the client?

Hi!

If I have a backend workflow (workflow on the server) and I have advanced filters in it, does the advanced filter occur on the client or the server?

I read @petter book and I thought it was eye-opening about how bubble functions. The book mentions that Bubble does the work for advanced filters on the client, not the server. But what if I have a backend workflow that includes advanced filters?

I would imagine that would run on the server side then – but maybe someone with more experience on that can confirm

So one of your steps of backend workflow contains advanced filters . So if the backend workflows runs on the server side the steps will also run on the server so should the filter (I think)

I think you should look at the server logs it may anwer this query

Honestly please stop with the continual advice that’s just straight out wrong… looking at the logs tells nothing about this…

If I had to guess I’d agree with Johnny. By run client side, it means that the processing is done after returning the data from the database. Bubble backend workflows can be imagined like a client so an advanced filter means the backend workflow will process the list after receiving the non-filtered list from the DB.

2 Likes

Well… if the workflow is running on the backend of your app, then of course, that’s where the advanced filtering will be done…

But, the backend of your app is not the database… (as @georgecollier points out)…

So, applying an advanced filter in a backend workflow still requires ALL of the data (within the initial search constraints) to be returned from the database to your app’s backend, where the advanced filter can then be applied.

2 Likes

@adamhholmes - looking at the ‘what contributes to WU’ manual page, I can’t find anything that would make Advanced filters more WU intensive in the backend than just a normal search. Feels too good to be true - reckon there’s something I’m missing?

I always assumed there was a processing time WU calculation for backend workflows but seems it’s only for plug-in actions, but it looks like the only real penalty is results returned from DB…

2 Likes

I can’t find anything that would make Advanced filters more WU intensive in the backend than just a normal search. Feels too good to be true - reckon there’s something I’m missing?

There’s a WU cost for the returned data (regardless of whether it’s in a backend workflow, or a ‘page’ workflow)…

So yeah, in WU terms, the only drawback to using an advanced filter (front end or backend) is the additional cost of the returned data (which could be high if there’s a lot of data).

Doing anything on the backend also incurs a cost for each server action within the workflow, plus the cost of scheduling the workflow to begin with.

Obviously, when using an advanced filter on the front end, there is the more important issue of the amount of data being sent to the browser (irrespective of WU cost) - which will cause performance issues (or even cause the browser to crash completely) if it’s very large.

5 Likes

Figured as much, thanks :grin:

2 Likes

@adamhholmes @georgecollier Thanks, guys! I appreciate the detailed explanation!

This topic was automatically closed after 70 days. New replies are no longer allowed.