| Summary: | BIRT output file size is too large | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Jiju <jijuelayedath> |
| Component: | BIRT | Assignee: | Jianchao Li <jianchao.li> |
| Status: | VERIFIED FIXED | QA Contact: | Xiaoying Gu <bluesoldier> |
| Severity: | critical | ||
| Priority: | P3 | CC: | bluesoldier, jianchao.li |
| Version: | 2.5.2 | ||
| Target Milestone: | 3.7.0 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | Obsolete | ||
|
Description
Jiju
We have some plain text reports with HTML '<PRE>' tag for embedding on to a web page. The same we converted in to BIRT. But the output file size are too large (some times X5 to X10 times bigger than the original output). Is there any way to reduce the output size of the BIRT reports? Would you please attache a sample report for me to reproduce this issue? Thanks Xiaoying Gu. We will scrub the existing report and will upload it to Bugzilla. Following are some of the observations we could make from the generated output. BIRT report size – 91 KB; Legacy System HTML Report Size – 41 KB; Both these reports have the same data and are in HTML format. We performed the below given exercise on the BIRT HTML output using a text editor and we could match/better the expected HTML size. 1. Merge unmerged, unused cell – Reduced the overall size by 4 KB (New O/P Size – 87 KB) 2. Each column has additional DIV to format a column – Removing these additional DIV reduces the size by 30 KB (New O/P Size – 57 KB) 3. Remove Whitespaces (Tab, Newline) – reduces the size by 20 KB (New O/P Size – 37 KB) Based on our analysis we have the following questions: 1) Is there a way we can remove whitespaces (tab, newline) on the generated BIRT HTML output? 2) Is there a way we can avoid the extra DIV tag (on BIRT HTML output) and apply the style directly to TD tag? Eg: Expected output: <TD align="center">Test Data</TD> BIRT Output: <TD class="style_7"><div class="style_8">Test Data</div></TD> - Jiju 1) we will provide an option in HTMLRenderOption to ignore the whitespaces for generating the HTML output. 2) the DIV tag is used to contain the content of the data item in the cell, which is contained in a TD tag. The cell item and data item are different items so that they may have different styles. In addition, a cell item can have several data items and DIV tags are required to contain the data items. There exists a workaround that you can overwrite our HTMLReportEmitter to ignore the DIV tags by yourself. Reopen it since we should fix the first problem. An option IHTMLRenderOption.HTML_ENABLE_COMPACT_MODE is added to control whether to enable the compact mode for html output. If the compact mode was enabled, the text indents(tabs) and new line seperators will be ignored.The fix was checked into 2.6.2 and head branch. Verified in daily build 3.7.0.v20110510-0630 runtime If add option.setOption(IHTMLRenderOption.HTML_ENABLE_COMPACT_MODE, true); or option.setEnableCompactMode(true); when rendering html reports, Tabs and line seperators will be omitted.. |