On 10/29/18, 4:36 PM, Buck Calabro wrote:
. . . . I don't find that 'several' + 10 character names is at all
older/bodgier than one SRCPF + Hungarian notation.
After looking up "Hungarian notation," I've now got an earworm of a few
measures of Zoltan Kodaly's (or in Hungarian, Kodaly Zoltan's) "Hary
Janos." tight-looping in my head!
Oh, and by the way, I found my bottleneck in escaping for JSON. I was
(1) single-buffering the escaping process, and (2) checking
%LEN(%TRIMR(BUFFER)) with every damn iteration of the loop, and I had
older code that was escaping other things in separate loops.
Double-buffering, with a variable-length output buffer, allowed me to
check the length of the input buffer ONCE, and do all the escaping in a
single loop. Got it down from over three minutes per thousand records
down to 7 seconds per thousand records.
I guess that's what happens when you just let stupid code evolve by
accretion of more stupidity.