On 7/1/2015 7:54 PM, Rich Marion wrote:
This is the main reason why I try to avoid MONITOR. It confused other
programmers where I work when they read through job logs.
There are two related issues:
1) Performance hit as a result of issuing a message to the job log
2) Lots of handled messages (ie not needing review) in the job log
With respect to the performance issue, unless it's an issue, don't worry
about it. That is, if your program runs in an acceptable amount of
time, don't worry about trying to optimise its performance. It's true
that each and every message slows things down, but by how much? Did you
measure it, or are you going to optimise without any numbers to improve
upon? That's a trap for young players.
With respect to the cluttered job log, I find this a reason to avoid
MONITOR for routine situations, but 'a reason to avoid' isn't at all the
same thing as 'For the love of all that we hold dear never ever use
MONITOR'.
Again, thinking of the cluttered job log, the QMHRMVPM API can remove
messages from the job log, so that can be used in conjunction with
MONITOR, but all that work with messages does add a runtime performance
cost. Whether that cost is acceptable or not depends entirely on the
application. For instance, if it's a subfile loader going through 20
records at a time, performance issues are pretty much moot.
Code at
http://code.midrange.com/8816a7d75f.html
On my 720, several runs show that the 'non-error' case takes about 75000
us, and the 'with error' case takes about 6500000 us (6.5 seconds).
As an Amazon Associate we earn from qualifying purchases.