Improve performance of WTF debugging in a loop

This forum is for posting of useful information
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4774
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Improve performance of WTF debugging in a loop

#1 Post by rdonnay »

A new clause has beend added to the WTF debugging command:

NOREFRESH will prevent the debug window from scrolling every time a new item is added.
This will greatly improve performance when debugging a lot of information in a loop.

http://bb.donnay-software.com/donnay/wtf.zip

Copy dcdialog.ch to your \exp20\include folder
Copy _dcqout.prg to your \exp20\source\dclipx folder.

Run build20.bat to rebuild dclipx.dll

Example:

Code: Select all

FOR i := 1 TO Len(aData)
  FOR j := i+1 TO Len(aData)
    cString1 := _SortString(aData[i],aColumns)
    cString2 := _SortString(aData[j],aColumns)

wtf cString1, cString2 NOREFRESH

    IF cString1 == cString2
      IF j == i+1
        nDupe++
        aData[i,Len(aData[i])] := nDupe
      ENDIF
      aData[j,Len(aData[j])] := nDupe
    ELSE
      i := j-1
      EXIT
    ENDIF
  NEXT
NEXT

WTF aData
The eXpress train is coming - and it has more cars.

Post Reply