Question Fast Reading

Good day guys, I just want to know how to make the program works fast, reading the datas in runtime with the codes of many "if's" and "for each" in a value-changed event. Cause, I got this code with many if's and for each, it is like nested for each and every conditions.

Any reply would be so much appreciated.
 

ForEachInvoiceDelete

Active Member
Post a code snippet.

My Answer :-
I know huge bits of legacy/other developers code can be pretty daunting. Just take the time to break it into chunks. eTime the queries, check the index's, make sure records are being read and used efficiently.

What people do :-
Buy faster hardware to mask the speed issues.
 

Cringer

ProgressTalk.com Moderator
Staff member
There's quite a lot of assistance out there.
I've given a presentation in the past about performance tuning. The Powerpoint and a Transcript are at Query Tuning - James Palmer
Paul Koufalis and Peter Judge, who are both far more qualified than I, have given a joint workshop and a presentation about the subject at both the US PUG and EMEA PUG in 2016. Their slide deck is at code_performance_wshop_redux.pdf

General rule of thumb for queries stacked full of IFs though is to change them to dynamic queries. In most case the IFs are due to relying on user input on a query screen. IFs and ORs in your query are going to hamper index selection. Convertin to a dynamic query means you only get the predicate you actually want and Progress is able to select a much more suitable index at run time.
 
Top