Slow Printing in Alaska

This forum is for general support of Xbase++
Post Reply
Message
Author
dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

Slow Printing in Alaska

#1 Post by dougtanner »

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!"
?

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slow Printing in Alaska

#2 Post by rdonnay »

Doug -

This sounds like a question that needs to be sent to Alaska.

I suggest emailing them at support@alaska-software.com.

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

User avatar
Auge_Ohr
Posts: 1407
Joined: Wed Feb 24, 2010 3:44 pm

Re: Slow Printing in Alaska

#3 Post by Auge_Ohr »

dougtanner wrote:

Code: Select all

			@ PROW() + 1, 1 SAY mTest[j]
		ELSE
			@ PROW() , PCOL() SAY mTest[j]
?
PROW() and PCOL() is very slow so use you own counter and try again ( see also PDR 4954 )
greetings by OHR
Jimmy

dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

Re: Slow Printing in Alaska

#4 Post by dougtanner »

Roger,

I submitted my issue to Alaska Support. I'll let you know if I hear anything back.

Auge_Ohr,

I eliminated the PROW() and PCOL() function calls and the printing was just as slow. The issue must be imbedded in the DevOut() function. Thanks for the suggestion.

Doug

dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

Re: Slow Printing in Alaska

#5 Post by dougtanner »

When I created my own DevPos() and DevOut() to print reports to a file, the time went down to 1.2 Seconds. From 12.9 seconds in Clipper and 126 seconds in Alaska. That is the solution I am going to implement. Users are always happy when you make the application runs 10 times faster. Ten times slower was unacceptable.

Most users are fickle. They quickly forget improvements and move on to something else to be unhappy about.

Doug

dougtanner
Posts: 32
Joined: Fri Jan 20, 2012 9:24 am

Re: Slow Printing in Alaska

#6 Post by dougtanner »

I got a response from Alaska Support. They pointed out that if I change to file to a local hard drive file, the time dropped to 2.15 seconds. I was able to duplicate those results and will change my program to now print to a local drive.

Doug

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Slow Printing in Alaska

#7 Post by rdonnay »

It sure sounds like an acceptable solution.
The eXpress train is coming - and it has more cars.

Post Reply