Does using a view-entity improve screen loading performance compared to using a normal entity-find with repeated conditions?

Hi everyone,

I have a question about performance best practices in Moqui.
In most of my screens, I usually create a view-entity and move my repeated conditions (filters, joins, where-clauses, etc.) into that view-entity instead of writing those conditions directly inside each screen’s <entity-find>.

My question is:

Does using a view-entity improve screen loading performance compared to using a normal entity-find with repeated conditions?

Or is it better (performance-wise) to avoid view-entities unless necessary?

I want to know whether:

  • Moqui optimizes view-entities internally,
  • or if they add more overhead compared to using direct entity-find queries.

Any recommendations or best practices would be appreciated.

Thanks!

That probably won’t be particularly faster but JOINs will be far faster than doing an entity find, iterating the results and doing another entity find for each item, etc. It will be one query with a view.

1 Like

thank you schue

1 Like