Reducing Page Sizes
Reducing Page Sizes
- Subject: Reducing Page Sizes
- From: Henrique Prange <email@hidden>
- Date: Wed, 1 Apr 2009 16:15:01 -0300
Hi there,
What common approaches could I use to reduce the overall size of HTML
pages generated by WO?
I'm working to improve the performance of an application. One problem
I found is the relative large size of some generated HTML. In some
places, it exceeds 1MB (only the HTML document, not including other
web resources) to show a list with 20 records, for instance.
To analyze the problem, I get the HTML generated for a random page.
Original HTML Size: 422 KB
One possible solution I found on the archives is to activate cookies
to handle session IDs and to deactivate the URL rewrite.
Size using Cookies for Session ID: 416 KB (2% reduction)
The reduction was irrelevant. :(
I looked carefully on the generated HTML and realized that it has very
long values for id and name attributes (there are some examples in the
end of this e-mail). BTW, most pages on this application have Ajax
components with auto generated id attributes. I did a simple find and
replace on the generated HTML document, replacing some parts of the
generated values. For example, the following tag...
name="0.0.9.19.1.2.1.5.br_com_doit_components_list_EmptyListDecorator.1.6.1.1.14.1.1.br_com_doit_components_list_TextInPlaceColumnComponent.0.3.1.1.5.1.1"
... was replaced by this "shorter" one.
name="0.0.9.19.1.2.1.5.X.1.6.1.1.14.1.1.Y.0.3.1.1.5.1.1"
Size after Long Names Replacement: 239 KB (43% reduction)
I realized half of the page size is used for id and name attributes.
Why the entire name of some components are used to generated those
values (i.e. br_com_doit_components_list_EmptyListDecorator)? Is
there any way to make WO/Wonder generate thinner values for those
attributes? Or the only solution is to provide the values manually for
each attribute?
Thank you for any advice.
Cheers,
Henrique
Examples of output generated. This one is a simple textfield:
<input type="text"
name="0.0.9.19.1.2.1.5.br_com_doit_components_list_EmptyListDecorator.1.6.1.1.14.1.1.br_com_doit_components_list_TextInPlaceColumnComponent.0.3.1.1.5.1.1"
id="e_0_0_9_19_1_2_1_5_br_com_doit_components_list_EmptyListDecorator_1_6_1_1_14_1_1_br_com_doit_components_list_TextInPlaceColumnComponent"/>
Following is the result of an AjaxInPlace:
<div updateurl="/cgi-bin/WebObjects/DOit.woa/ajax/4.0.0.9.19.1.2.1.5.br_com_doit_components_list_EmptyListDecorator.1.6.1.1.19.1.1.br_com_doit_components_list_ComponentColumnComponent.0.3.1.1.1.PermanentTagEditComponent.0"
id="e_0_0_9_19_1_2_1_5_br_com_doit_components_list_EmptyListDecorator_1_6_1_1_19_1_1_br_com_doit_components_list_ComponentColumnComponent_0_3_1_1_1_PermanentTagEditComponent">
And this larger one for AjaxModalDialog:
<a onclick="openAMD_e_0_0_9_19_1_2_1_5_br_com_doit_components_list_EmptyListDecorator_1_7_1_1_0_1_1_br_com_doit_components_list_ComponentColumnComponent_0_3_1_1_1_AccountingEntryInfoComponent_0_1();
return false;" title="The Title"
id="e_0_0_9_19_1_2_1_5_br_com_doit_components_list_EmptyListDecorator_1_7_1_1_0_1_1_br_com_doit_components_list_ComponentColumnComponent_0_3_1_1_1_AccountingEntryInfoComponent_0_1"
href="javascript:void(0)"><img
src="/DOit/v0003/themes/doit/images/icons/g_information.png"/></a><script>
openAMD_e_0_0_9_19_1_2_1_5_br_com_doit_components_list_EmptyListDecorator_1_7_1_1_0_1_1_br_com_doit_components_list_ComponentColumnComponent_0_3_1_1_1_AccountingEntryInfoComponent_0_1
= function(titleBarText) {
options = {title:'Detalhes do Lançamento', afterHide:function(v) {
AUL.request('/cgi-bin/WebObjects/DOit.woa/ajax/4.0.0.9.19.1.2.1.5.br_com_doit_components_list_EmptyListDecorator.1.7.1.1.0.1.1.br_com_doit_components_list_ComponentColumnComponent.0.3.1.1.1.AccountingEntryInfoComponent.0.1.close',
null, null, null);}};
if (titleBarText) options.title = titleBarText;
Modalbox.show('/cgi-bin/WebObjects/DOit.woa/ajax/4.0.0.9.19.1.2.1.5.br_com_doit_components_list_EmptyListDecorator.1.7.1.1.0.1.1.br_com_doit_components_list_ComponentColumnComponent.0.3.1.1.1.AccountingEntryInfoComponent.0.1.open',
options);
}
</script>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden