Page Load very slow, if no records found or no record meet default conditions

  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi,

This has been causing me issues for a  long time, and not sure how to fix it or make it more performing

Mostly happening on page include

If the model is not returning any row, either because there's none to return or there's no record that meet default "conditions", the load of that page include is extremely slow (sometimes 30 secs+)


Example : by default model shows records with a condition : "custom date field" must be in the last 4 months.

If it finds records it load relatively quick
If no record found for that period, it's very slow....

If i change the filter to example show me the last 12 months, and it has rows, it loads quickly...

A rendering condition , not to load table if no rows in model, is not a solution for me, as there may be rows when I extend the range....

Anyone else experiencing this kind of issue, and if yes any potential solutions?


Thank you,
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Official Response
Typically, you'll want to use "Abort this model's query" in this situation. We should probably make that the default instead of "Deactivate this condition". You would want "Deactivate this condition" in the case where you have additional conditions, or "OR" logic or something like that.