Focal Point
[SOLVED] HTML Composer: How to Speed up Drop-down Box Load times with Procedure

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1787007396

June 22, 2020, 12:15 PM
Brandon Andrathy
[SOLVED] HTML Composer: How to Speed up Drop-down Box Load times with Procedure
Hello,

I'm wondering if someone could advise me of a best practice for including external procedures in drop-down boxes generated in an HTML Composer page.

Even with limited records (282), the HTML page takes around 10 seconds to load which to me seems a little crazy. The code I am using is:

 

TABLE FILE MAPMMPLANTOSERVICETYPE
SUM
	COMPUTE CLIENT_TYPE_FIN/A100 = IF CLIENTTYPE EQ 'PopHealth' THEN 'Population Health' ELSE IF CLIENTTYPE EQ 'FinancialRisk' THEN 'Financial Risk';
BY  MAPMMPLANTOSERVICETYPE.MAPMMPLANTOSERVICETYPE.CLIENTTYPE
BY  MAPMMPLANTOSERVICETYPE.MAPMMPLANTOSERVICETYPE.MARKETTYPE
BY  MAPMMPLANTOSERVICETYPE.MAPMMPLANTOSERVICETYPE.CLIENTNAME
BY  MAPMMPLANTOSERVICETYPE.MAPMMPLANTOSERVICETYPE.GROUPNAME
BY  MAPMMPLANTOSERVICETYPE.MAPMMPLANTOSERVICETYPE.GROUP_CD
WHERE CLIENTNAME IS NOT MISSING
WHERE GROUP_CD IS NOT MISSING
END

 

This message has been edited. Last edited by: Brandon Andrathy,


WebFOCUS 8204
June 23, 2020, 07:16 AM
Wep5622
You don't seem to have any parameterised constraints on that procedure, so you could just cache the results into a HOLD-file and use that instead.

If that still takes 10 seconds, perhaps you're looking at a DNS issue (10s is a default DNS timeout).

Does the procedure still take 10s when run separately? If that's the case, you need to look at the underlying storage. How many rows are in that table? Do you have appropriate indices?

Is this a table in an RDBMS and is the request perhaps executed through a FOCUS managed JOIN?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
June 23, 2020, 07:36 AM
Mike in DeLand
I have the same problem. I created a fex that will read my database and put the fields I want into a permanent focus hold file, and then I use the hold file in the dropdown. It's way faster than reading it from our database for some reason. I extract the database table into the hold file nightly via ReportCaster so the hold file and dropdown are up-to-date.


Webfocus 8
Windows, Linux
June 23, 2020, 08:10 AM
Brandon Andrathy
@Wep5622. Thanks for your response. The procedure takes maybe a second to run. There are 200 rows in the table. I don't think that's a ton. When you say cache the results, do you mean saving it in an app path such as:

 

ON TABLE HOLD AS 'LOCATION/HOLD_FILE'

 


@Mike

ohh good point. So do an app path. Thanks Mike. Yeah I was considering that. Thankfully these menu selections won't be too hard to maintain. I'll give this a whirl and let you all know.

Appreciate it!!


WebFOCUS 8204
June 23, 2020, 09:10 AM
Brandon Andrathy
ok here's my solution. I run my procedure, hold it in foccache and then include the filter panel after the procedure runs in a .fex wrapper. I shaved 4 seconds off load time. I think this is sufficient.

Code below:

 

TABLE FILE CAR
SUM
	COMPUTE CLIENT_TYPE_FIN/A100 = IF COUNTRY EQ 'FRANCE' THEN 'Population Health' ELSE IF COUNTRY EQ 'ENGLAND' THEN 'Financial Risk';
BY  COUNTRY
BY  CAR
BY  MODEL
ON TABLE HOLD AS 'FOCCACHE/TEST'
END

-HTMLFORM IBFS:/WFC/Repository/CM_Performance/Common_Content/CM_TEST.htm

 


Then I have a separate .fex that has the final table in it that the HTML composer uses.

Thanks for your help all.


WebFOCUS 8204