Optimization, the rules        

<< Click to Display Table of Contents >>

Navigation:  Performances >

Optimization, the rules        

vpxPrint  processes all tags that you have included in your report.

Each tag needs some instructions to be understood, generating overhead.

 

Less tags you have, quicker is the rendering.

 

After 20 years of support, examining how our users write on their "xpr" files, we have defined some rules that could speed up the rendering.

 

1. Lack of line-feeds:

This is the first problem that we faced.

As vpxPrint reads the "xpr" file line by line, you must have LF (LINUX) or CR-LF (WINDOWS) to end lines.

If no line feed exists, vpxPrint reads the entire file in a single operation. Imagine a buffer of 10Mb. Some files can't be processed, the others are rendered very slowly.

 

Sometimes we saw CR (carriage-return) as line terminators, replace CR by LF or CR-LF.

 

Have a look at the rendering discussion.

 

2. Concepts:

Bookmarks and frames are persistent:

Bookmarks and frames definition remains active until the end of the report.

 

You don't need to define them on every page.

 

If you have different page backgrounds, simply use different names for bookmarks of the different pages.

You can then delete all extra bookmarks and frame declarations from your file, except the first ones.

 

3. Tags simplification:

Try to delete all multiple and redundant tags:

<B> <P..> <F....>

<PREVIEW>

<CPI> or <LPI>, <ADJUST=LPI>, <RESTORE=LPI>, <RESTORE=CPI>        (time-consuming tags)

 

Do not write

But rather

<AT=#10,#10>

<=10>

<BGCOLOR=0,0,0>

<FGCOLOR=255,255,255>

<BGCOLOR=BLACK>

<FGCOLOR=WHITE>

 

</P10>

This tag does not exist!


 


 


 

 

4. Frames:

Simplify your code by using frames.

We see frequently:

<R1><C10>Company XXXXX

<R2><C10>11 xxxxxxxxxxx

<R3><C10>yyyyyyyyyyyyy

... etc.

 

Different inconveniences:

if the model changes, if the text is to be shifted, you must change several tags from <C10> to the new <CXX> tag. Same problem with <R>

excessive coding

manual coding if line exceeds the available width

 

Preferred coding:

<R10><C10><#1><R+10><C80><FRAME#1><USE#1>Company XXXX

11 xxxxxxxxxx

yyyyyyyyyyyyy

</USE>