Slow Printing in Alaska
Posted: Thu May 03, 2012 1:00 pm
I have several large applications That print several hundred documents of 100 to 600 pages in length. All of the printing is done to a file with imbedded PCL commands and sent though a document handling system to our high speed printers. We print over 2,000,000 sheets a month. Alaska is taking 10 times longer than Clipper to print to the files. The following example takes 12.9 seconds in Clipper but 126.58 seconds in Alaska. Expanded to the size of our documents and print time becomes unacceptable. Has anyone else solved this issue. I'm thinking I will have to write my own DevPos and DevOut functions to handle the file I/O and speed up the printing.
PROCEDURE MAIN
LOCAL mFile := "TEST.TXT"
LOCAL i,j
LOCAL mTest := {"This is Test ",;
"This is Test 1 ",;
"This is Test 2 ",;
"This is Test 3 ",;
"This is Test 4 ",;
"This is Test 5 ",;
"This is Test 6 ",;
"This is Test 7 ",;
"This is Test 8 ",;
"This is Test 9 ",;
"This is Test 10 ",;
"This is Test 11 ",;
"This is Test 12 ",;
"This is Test 13 ",;
"This is Test 14 ",;
"This is Test 15 ",;
"This is Test 16 ",;
"This is Test 17 ",;
"This is Test 18 ",;
"This is Test 19 ",;
"This is Test 20 "}
CLS
WAIT "Start?"
?
? "Starting"
SET PRINT TO (mFile)
SET DEVICE TO PRINT
mStart := SECONDS()
FOR i := 1 TO 20000
FOR j := 1 TO LEN(mTest)
IF j == 1
@ PROW() + 1, 1 SAY mTest[j]
ELSE
@ PROW() , PCOL() SAY mTest[j]
ENDIF
NEXT
NEXT
SET PRINT TO
SET DEVICE TO SCREEN
WAIT "Time: " + ALLTRIM(STR(SECONDS() - mStart,10,2))
?
? "All Done!"
?
PROCEDURE MAIN
LOCAL mFile := "TEST.TXT"
LOCAL i,j
LOCAL mTest := {"This is Test ",;
"This is Test 1 ",;
"This is Test 2 ",;
"This is Test 3 ",;
"This is Test 4 ",;
"This is Test 5 ",;
"This is Test 6 ",;
"This is Test 7 ",;
"This is Test 8 ",;
"This is Test 9 ",;
"This is Test 10 ",;
"This is Test 11 ",;
"This is Test 12 ",;
"This is Test 13 ",;
"This is Test 14 ",;
"This is Test 15 ",;
"This is Test 16 ",;
"This is Test 17 ",;
"This is Test 18 ",;
"This is Test 19 ",;
"This is Test 20 "}
CLS
WAIT "Start?"
?
? "Starting"
SET PRINT TO (mFile)
SET DEVICE TO PRINT
mStart := SECONDS()
FOR i := 1 TO 20000
FOR j := 1 TO LEN(mTest)
IF j == 1
@ PROW() + 1, 1 SAY mTest[j]
ELSE
@ PROW() , PCOL() SAY mTest[j]
ENDIF
NEXT
NEXT
SET PRINT TO
SET DEVICE TO SCREEN
WAIT "Time: " + ALLTRIM(STR(SECONDS() - mStart,10,2))
?
? "All Done!"
?