Help with Display format - slowing down my POS

Hey guys!

i used to us display format to show on entity screen some details,
a while ago i notice that is slowing down Samba and than it got worse and worse
every time i’m selecting a screen i have to wait around 30 sec before it load.
i thought it may be my software, so i cancel the display format and everything back to normal
now i got all new software’s (SSD, 8GB Ram, 5GHz router, Gigabit Switch)
and at the moment i add the display format to the state
( the most simple -
$1
{REPORT TICKET DETAILS:T.RemainingAmount:(TEN.Table=$1) and T.RemainingAmount>0}
everything slow down again and just to load the the table screen takes about 30 sec even with only 1 table is open,

i’m assuming that is related to some rule or action that i create but i couldn’t find anything,
any ideas maybe?

Thank you :pray:

How many tables?
I removed the display format also as after around 3 years and 200k tickets things slowed.
The issue is that report is having to check ALL tickets in DB in loop for each table every time you load the screen.
In theory a better faster solution would be to update an entity state when you close tickets and use that in the format.
If you used similar report expression you may see a 1 sec delay in closing as it’s only having to run that report once. Then display format will query entoty stste which will be fast as it’s just checking a small amount of data.
Or you calculate the values directly from ticket which will need a little more throught if your wanting to account for multiple tickets per entity.

I agree. Maybe using specific expressions to show exactly what you want will decrease the amount of tickets loaded to show only this small partial info.

The issue here is REPORT TICKET DETAILS will be looking at ALL tickets.
It would be nice if reports could be limited to say just work period however dont think thats simple given it would still be checking db for this wp tickets in similar manner.
Fastest to load would be using entity states. Question then is how you want to calculate/update these. Even still REPORT TICKET DETAILS on closing or something would spread the load as said with a small delay at ticket close rather than a long delay while that report is run again and again for each table.

Thank you for answers,

so i understand that reporting ticket details can take time as it must to check all the ticket in the DB (30,000 at the moment)
so i should use REPORT ENTITY DETAILS and add update entity states when closing,

but i still don’t understand what should i update at the entity state or what expressions i can use to limit the amount of thicket that will load

i try to add on closing update entity state and status [:RemainingAmount]
and on New orders state i display format
$1{REPORT ENTITY DETAILS:T.RemainingAmount:(TEN.Table=$1) and T.RemainingAmount>0}
but is just change the table color to black (empty)

Thank you

You should create new entity status. Something along the line of TEStatus=Open & TEStatus=Closed. You should update tickets with these statuses when closing unpaid ticket and when paying ticket.

And then load statuses instead of all tickets to show you remaining balance.

Yer, DONT USE STATUS, that will screw things up real quickly. Use a custom state…

Never mess with default states unless you know without a doubt what you are doing. You will most surely cripple your system where it wont work as its meant to. If you are not familiar with how to use States I suggest studying them first on the forum in a test non production database. States are very important and can dictate how the entire system works.