Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Optimisation of HTML code in a report

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Optimisation of HTML code in a report
 Login/Join
 
Platinum Member
posted
I am required to have expand/contract feature(to show an organisation hierarchy) in my report. Am using the HTML tags and Java scripts to implement the same wherein I am embedding each of my column value in a html tag like :
<tr><td>COL1</td>><td>COL2</td>><td>COL3</td></tr>

Finally am holding the above records in to a hold file of format WP and embedding the so obtained hold file in a HTML form.
My observation when I run the report is: The time taken for the fetched data to be loaded into the browser is long compared to fetching and manipulation of data, probably because of these HTML tags that am forming around every record.
Is there any way I can optimise my code?

This message has been edited. Last edited by: Kerry,


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Master
posted Hide Post
You need to fix you post put the code between code tags. Just click the code button and the paste your code between them




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Hi
Given below is a sample tag which I am using in my code. Please note that there are several such tags because of the report requirements.
  COMPUTE
  V_HTMLTAG/A1000 = '<tr id="'||COL3|| COL0||COL1||'" class="DataFieldsVisible"><td nowrap align="left">'
| V_DISP||'</td><td onClick="LevelTwoLink('''||C4||''','''||C5||''',''&P_1'',''&P_2'',''&P_3'',''&P_4'')"><FONT '|V_LINKCLASS|' COLOR="'||V_LINKCLR||'">'||
 V_C01_DISP||'</FONT></td>'||'<td nowrap>'||V_C02_DISP||'</td><td nowrap>'||V_C03_DISP||
  '</td><td bgcolor="'||V_C04_CLR||'">'||V_C04_DISP||'</td><td bgcolor="'||V_C05_CLR||
   '">'||V_C05_DISP||'</td><td bgcolor="'||V_MTD_CLRCODE||'">'||V_C06_DISP||
    '</td><td width="1pt"  bgcolor="white"></td><td nowrap>'||V_C01_X_DISP||'</td><td nowrap>'||
  V_C02_YTD_DISP||'</td><td nowrap>'||V_C03_Y_DISP||'</td><td bgcolor="'||V_C04_Y_CLR||
   '">'||V_C04_Y_DISP||'</td><td bgcolor="'||V_C05_Y_CLR||'">'||
    V_C05_Y_DISP||'</td><td bgcolor="'||V_Y_CLRCODE||'">'||V_C06_Y_DISP||
     '</td></tr>';


Also, i am using - ON TABLE HOLD FORMAT WP, for the purpose of generating these tags.

Please suggest something to improve the performance. Right now the report is taking 2 minutes to genrate these tags and get loaded on the browser.

Regards
Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
"Right now the report is taking 2 minutes to genrate these tags and get loaded on the browser"

You have to determine which part of the process is taking the extra time.

Is it Citrix that's causing the slowdown?
Did you optimize your data extract if you're extracting from a dbms?
How many rows are you computing the HTML for?

And, I would use FORMAT ALPHA for this type of report. Why did you select WP?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
OK, Lets do a little test. Insteading of having the output sent to the browser just hold it and let webfocus return. This will tell you if the issue is in generating the results, or network traffic/user machine speed?




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Yup - I tested it for the data. It takes about 20 seconds to get the data (when I tried to comment out the hold part and displaying the data in a normal HTML page). The remaining time (close to 2 minutes) is spent in generating these HTML tags.
I'm trying to move these conditional tags to the HTML page (using javascript), but this will take a lot of effort. Is there any way I can speed up the tag generation?

Syed


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Master
posted Hide Post
Not sure I under stand what you did last. Did you do all the computes, create the tags, and just hold the data to a file and not send it all back to the browser. If you did all that then it has got to be a network traffic issue. To verify that it is a network traffic issue, Try this test save it to a file that can be accessed from the webserver. once it is finished then open up a new browser and put the accress to the file in the url and see how long that takes.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Hi
Actually I'm using FORMAT WP to hold the data in a Word Processing format so that the formatting (tag generation) happens before and the browser just displays the formatted data.
However, it looks like this process (generation of tags) is taking a lot of time.
When I comment out the statement - ON TABLE HOLD FORMAT WP, and try to display in the regular HTML format, the processing happens pretty fast! This is the reason why I pointed out to the tag generation.
Let me know if you have any pointers.


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
I'm not sure why you're using WP as the HOLD format.

Wouldn't ALPHA work? Here's an example:

SET HOLDLIST=PRINTONLY
RUN

TABLE FILE CAR
PRINT
COMPUTE LINE/A100 = '<TR><TD CLASS=C1>' || COUNTRY || '</TD><TD>' || CAR || '</TD><TD>' || MODEL || '</TD></TR>';
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-RUN

-HTMLFORM BEGIN
<STYLE>
BODY { FONT-FAMILY: ARIAL, SANS-SERIF; FONT-SIZE: .8EM; }
TD { FONT-SIZE: .8EM; BORDER: 1PX SOLID LIGHT-GRAY; }
TABLE { BORDER-COLLAPSE: COLLAPSE; }
.C1 { COLOR: GREEN; }
.T1 { FONT-WEIGHT: BOLD; }
</STYLE>
<TABLE BORDER=0>
<TR><TD CLASS=T1>COUNTRY</TD><TD CLASS=T1>CAR</TD><TD CLASS=T1>MODEL</TD></TR>
!IBI.FIL.H001;
</TABLE>
-HTMLFORM END


This does pretty much what you are doing. Are you using WP for page heading and numbering purposes?

My two thousandth posting!


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Two thousandth posting!! Since IBI won't pay you they should at least give you a free pass to next years Summit wherever that may be.

ET


FOCUS 7.6 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Platinum Member
posted Hide Post
Congrats on your 2000th posting!!
ALPHA worked just fine. I was thinking that WP would be needed for generating those tagsSmiler
However, the performance is still the same.
Can you let me know why is it taking so much time to generate the tags and display them on the browser?


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Expert
posted Hide Post
Is it possible that is has something to do with the "through Citrix" part of your infra-structure?

Have you tried printing the data, but without the TR and TD tags, just to see if the same number of data rows get returned faster?


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Platinum Member
posted Hide Post
Almost the same timeFrowner. It looks like it is a lot of data, which is why its taking somuch time to get the output.


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Platinum Member
posted Hide Post
Oops!! I just commented out the FORMAT ALPHA part, and its taking just 14 seconds to get the o/p in the default format.
Which means the tags are creating this issue.


Using WF 7.1.7/Dev Studio
 
Posts: 189 | Location: Boston, MA | Registered: July 12, 2005Report This Post
Virtuoso
posted Hide Post
Just one question - since WF provides "accordion" functionality to expand/contract lines, wouldn't it be better to use that than jump through all the hoops to reinvent the wheel? Maybe you already looked at it and it wasn't what you needed?


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Optimisation of HTML code in a report

Copyright © 1996-2020 Information Builders