Вы находитесь на странице: 1из 3

Improve Primo Performance and Page Speed

PRIMOs performance can be improved if we implement these points in our


application.
1) Enable Gzip compression on tomcat, so that each response will be
compressed. This will reduce response size up to 80%.

2) We can also reduce the unwanted number of HTTP request to server for the
same response like. getCountryList.do , getLetterQuestionsGroupList.do, etc.
This will reduce the application loading time and performance of Primo.

3) After doing any operation on the UI, we should not load all the grid values of
page again unless it is required.
For example. in Group Inbox, when user view any new document, currently
Primo loads the whole Group Inbox page to only update and single row of a
grid. (I and Mohit have already updated to code to make it efficient.). There
are other pages where we should have to remove the page refresh calls.(if its
not required).
Similarly, on My Report page, when user check-out any report, Primo refreshes
both Group Inbox and My Report, which might not be required.

4) Instead of using XML we can use JSON, because JSON is much more faster in
parsing and it also has less size than the XML. Because XML needs the
opening and closing bracket for any property, and JSON need only the
property name once. JSON reduces the data size up to 33% than XML.
For example. Country List (in XML format)
<ROWSET>
<ROW>
<CODE>AFG</CODE>
<CODE_VALUE>AFGHANISTAN</CODE_VALUE>
</ROW>
<ROW>
<CODE>ALB</CODE>
<CODE_VALUE>ALBANIA</CODE_VALUE>
</ROW>
..
</ROWSET>

Country List in JSON


{
"ROWSET": {
"ROW": [
{
"CODE": "AFG",
"CODE_VALUE": "AFGHANISTAN"
},
{
"CODE": "ALB",
"CODE_VALUE": "ALBANIA"
},
{
"CODE": "DZA",
"CODE_VALUE": "ALGERIA"
},
..
}

To achieve this we only need to convert the XML to JSON at Java end. And
parse this JSON at Flex end.
5) Constants dropdowns should fetch the options only once. Currently in Primo
whenever a dropdown is displayed on UI (in case of any Popup window), It
loads the options every time.
For example, In Group Inbox, when user rejects any document, a popup
opens which asks rejection reason.

Every time user selects to reject any document, the popup fetch the rejection
reasons from server, which we can manged to store in a variable. In that way
we can increase the performance of application.
6)

All constant values should loads once and stored in the memory, as these
constant values are not updated frequently.

Вам также может понравиться