User guide

eWON 500-2001-4001-4002 User Guide - User defined Web site
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 185
10.3.2.3 Improving WEB performance using Web context variables and bASP
The example above introduces how the WEB performance can be improved.
Suppose to following example:
In this example, we print the config Name and Description fields for a Tag called "Tag1". There are 2 bASP blocks and we call SETSYS
TAG,"load" twice because at the end of the first bASP block there may be a context switch with another BASIC request loading the TAG edition
area with another Tag value (depending of the rest of the application, but let's take the worst case).
These 2 SETSYS TAG,"load" take some time and we have 2 BASIC context switch to generate the page.
The following implementation returns the same result with a significantly improved performance:
In this case Tag1 is loaded only once in the edition area and we generate only one BASIC context switch to execute the only bASP block.
<html>
<head>
<title>SSI Demo</title>
</head>
<body>
<p>
Tag Name:<%#ExeSSI,
SETSYS TAG,"load","Tag1"
PRINT #0,GETSYS TAG,"Name"%>
Tag Desc:<%#ExeSSI,
SETSYS TAG,"load","Tag1"
PRINT #0,GETSYS TAG,"Description"%>
</p>
</body>
</html>
<html>
<head>
<title>SSI Demo</title>
</head>
<body>
<p>
<%#ExeSSI,
SETSYS TAG,"load","Tag1"
tag1_name!= GETSYS TAG,"Name"
tag1_desc!= GETSYS TAG,"Description"%>
Tag Name:<%#VarSSI,tag1_name%><BR>
Tag Desc:<%#VarSSI,tag1_desc%><BR>
</p>
</body>
</html>