You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2021/03/29 17:43:41 UTC

[GitHub] [royale-asjs] asifashfaq opened a new issue #1097: Documents Loading too Slow Compared to Flex

asifashfaq opened a new issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097


   Hi All,
   Our D-biz Application is successfuly migrated to royale from flex 3 months ago. now it is running on our Client.
   
   User's are facing Documents loading Issue.
   help is required in this regard.
   i have to fix performace issue in a single document. 
   so i have created a CPUProfiler and screen shot also attached.
   if anyone can help will be highly appreciated.
   Screenshot Also attached.
   [CPU-20210329T193958.zip](https://github.com/apache/royale-asjs/files/6223492/CPU-20210329T193958.zip)
   ![PO SS1](https://user-images.githubusercontent.com/71439339/112877171-e213fe80-90df-11eb-8701-7afbee2b11fb.PNG)
   vdi also available to check in detail.
   Please Reply if anyone is willing to help.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] asifashfaq commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
asifashfaq commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-811271484


   Dear HTH..
   
   Thanks For your Reply.
   Surely i will implement these suggestions.
   Then will get back to you.
   
   Thank you.
   
   Regards
   Asif
   
   On Tue, 30 Mar 2021, 4:25 pm Harbs, ***@***.***> wrote:
   
   > Based on the profiler, it looks like you have a data grid which is
   > dynamically resized which is in turn calling layout on data renderers. By
   > the look of it, many times. There's also a number of forced reflows which
   > is very bad for performance.
   >
   > Some suggestions:
   >
   >    1. Use fixed sizing.
   >    2. Use a simpler layout bead.
   >    3. If you have a lot of data, use dynamic loading of data and / or
   >    renderers as they are needed for display.
   >    4. Look into why you are getting forced reflow and try to eliminate
   >    that. The best way to do that is to defer measuring until you are within a
   >    requestAnimationFrame handler.
   >
   > HTH...
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/royale-asjs/issues/1097#issuecomment-810143204>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ARBBH2556JVSMMZQ45OYCB3TGGYLTANCNFSM42ABJVYQ>
   > .
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] asifashfaq commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
asifashfaq commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-844889110


   Problem fixed by minimizing no. of columns in Advance Data Grid.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] asifashfaq commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
asifashfaq commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-831767607


   Problem fixed by minimizing no. of columns in Advance Data Grid.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] asifashfaq closed issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
asifashfaq closed issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] alinakazi edited a comment on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
alinakazi edited a comment on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-811761492






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] asifashfaq commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
asifashfaq commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-811750313


   Hi,
   
   Its verified that Advanced data grid columns are causing delay in documents loading.
   if i commented below  <mx:columns> </mx:columns>tag then  document loading time decreased upto 70% which is quite 
   satisfactory for users. and it is near to apache Flex application Loading time.
   
   now Please suggest to use an alternative or changes in datagrid to resolve my Problem.
   i will be very Thankful.
   
   1. i have tested to fix datagrid width and height but problem not resolved.
   2. used datagrid in a container but all in vein.
   3. i don't know the use of layout bead. i am new to royale.
   Please Suggest.
   
   **Code:**
   
   `<mx:AdvancedDataGrid id="dgProducts" dataProvider="{arrProductDP}" sortExpertMode="true" styleName="advancedDataGrid"
   					 rowHeight="20" verticalAlign="middle" horizontalScrollPolicy="auto" itemDoubleClick="fn_EditProduct(true);"
   					 maxWidth="{bcBill.width - 80}" top="241" bottom="103" left="5" right="80">
   	<mx:columns> 
   		
   		<mx:AdvancedDataGridColumn dataField="S No." headerText="S No." width="50" labelFunction="fn_GetSNo"/>
   		<mx:AdvancedDataGridColumn dataField="productCode" headerText="Product Code" width="120" labelFunction="CallingDocListFunction8"/>
   		<mx:AdvancedDataGridColumn dataField="productDesc" headerText="Description" width="150"/>
   		<mx:AdvancedDataGridColumn dataField="pbdStoreCode" headerText="Store Code" width="120" labelFunction="CallingDocListFunction4"/>
   		<mx:AdvancedDataGridColumn dataField="pbdStoreDesc" headerText="Description" width="150"/>
   		<mx:AdvancedDataGridColumn dataField="prodUnitDesc" headerStyleName="centered" headerText="Unit" width="100"/>
   		<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Qty Ordered" dataField="pbdQtyOrdered"
   								   width="100" id="dgcQtyOrdered" labelFunction="CallingDocListFunction2"/>
   		<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Qty Received" dataField="pbdQtyReceived"
   								   width="100" id="dgcQtyReceived" labelFunction="CallingDocListFunction5"/>
   		<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Sepcific Temp" dataField="pbdObsSpecificTemp" width="95" id="dgcObsSpecificTemp"
   									labelFunction="CallingDocListFunction5"/>
   		<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Rate" id="dgcRate"
   									dataField="pbdRate" width="100" labelFunction="CallingDocListFunction2" />
   		<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Value" 
   									id="dgcValue" dataField="pbdValue" width="100" 
   									labelFunction="CallingDocListFunction6"/>
   		<mx:AdvancedDataGridColumn headerStyleName="centered" headerText="Discount Type"
   									dataField="pbdDiscTypeDesc" width="85"/>
   		<mx:AdvancedDataGridColumn dataField="pbdDiscRate" headerText="Discount Rate" width="90" id="dgcDiscRate"
   									labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSalestxTypeDesc" headerText="Sales Tax Type" width="85"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSaleTxRate" headerText="Sales Tax Rate" width="100" id="dgcSaleTxRate"
   									labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSaleTaxAmount" id="dgcSaleTaxAmount" width="100"
   									headerText="Sales Tax Amount" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdExciseDutyDesc" headerText="CED Rule"/>
   		<mx:AdvancedDataGridColumn dataField="pbdExciseDutyUnitRate" id="dgcExciseDutyUnitRate"
   									headerText="CED Rate" width="100" labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdExciseDutyRate" id="dgcExciseDutyRate" textAlign="right"
   									headerText="CED (%)" width="100" labelFunction="CallingDocListFunction2"/>
   		<mx:AdvancedDataGridColumn dataField="pbdExciseDtyAmt" id="dgcExciseDtyAmt" textAlign="right"
   									headerText="CED Amount" width="100" labelFunction="CallingDocListFunction6"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCustomDtyRateDesc" headerText="Custom Duty Type" width="100"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCustomDtyRate" id="dgcCustomDtyRate" width="100"
   									headerText="Custom Duty Rate" labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCustomDutyAmt" id="dgcCustomDutyAmt" width="100"
   									headerText="Custom Duty Amount" labelFunction="CallingDocListFunction6" textAlign="right"/>	
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna1Desc" width="150" headerText="{parentApplication.appParams.PAR_ANALYSIS1}"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna2Desc" width="150" headerText="{parentApplication.appParams.PAR_ANALYSIS2}"/>										
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna3Desc" width="150" headerText="{parentApplication.appParams.PAR_ANALYSIS3}"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna4Desc" width="150" headerText="{parentApplication.appParams.PAR_ANALYSIS4}"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna5Desc" width="150" headerText="{parentApplication.appParams.PAR_ANALYSIS5}"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSepcialExciseRuleDesc" headerText="SED Rule" width="100"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSEDUnitRate" id="dgcSEDUnitRate" width="100"
   									headerText="SED Rate" labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSEDRate" headerText="SED (%)" width="100" id="dgcSEDRate" labelFunction="CallingDocListFunction2" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSEDAmount" id="dgcSEDAmount" headerText="SED Amount"
   									width="100" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdFreightCharges" id="dgcFreightCharges" headerText="{isFreightName}"
   									width="100" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdPackingCharges" id="dgcPackingCharges" width="90"
   									headerText="{isPackingName}" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="pbdServiceCharges" id="dgcServiceCharges" width="90"
   									headerText="{isServiceName}" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn id="dgcLoading" dataField="pbdLoading" headerText="{isLoadingName}"
   									width="95" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn id="dgcTotalValue" dataField="pbdTotalValue" headerText="Gross Amount"
   									width="100" labelFunction="CallingDocListFunction6" textAlign="right"/>
   		<mx:AdvancedDataGridColumn dataField="prodUnit" headerText="Unit" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdQty60F" id="dgcQty60F" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdQty85F" id="dgcQty85F" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdObsSpecificGravity" id="dgcObsSpecificGravity" visible="false"/>
   		<mx:AdvancedDataGridColumn headerStyleName="centered" headerText="Discount Type" dataField="pbdDiscType" width="90" visible="false"/>
   		<mx:AdvancedDataGridColumn headerStyleName="centered" headerText="Discount Type" dataField="pbdDiscAmount" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSalestxType" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdExciseDutyRule" headerText="CED Rule" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCustomDutyType" headerText="Custom Duty Type" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna1" headerText="Analysis 1" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna2" headerText="Analysis 2" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna3" headerText="Analysis 3" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna4" headerText="Analysis 4" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGlAna5" headerText="Analysis 5" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdGRNUpdateNo" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdValExcludingStax" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSepcialExciseRule" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCostCentre" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdCostCentreDesc" headerText="Description" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdTruckNo" headerText="Truck No." visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdPrd_GlInvAcc" headerText="Inventory A/c" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdPrd_GlInvAccDesc" headerText="Inventory A/c" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdNarration" headerText="Narration" visible="false"/> 
   		<mx:AdvancedDataGridColumn dataField="pbdExpiryDate" headerText="Expiry Date" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdYear" headerText="Year" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdSite" headerText="Site" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdPeriod" headerText="Period" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdNo" headerText="No." visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdTransNo" headerText="S No." visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdpbYear" headerText="Year" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdpbSite" headerText="Site" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdpbPeriod" headerText="Period" visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="pbdpbNo" headerText="No." visible="false"/>
   		<mx:AdvancedDataGridColumn dataField="BD_APAMOUNT" headerText="No." visible="false"/>
   		
   	</mx:columns>
   	
   </mx:AdvancedDataGrid>`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] Harbs commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
Harbs commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-810143204


   Based on the profiler, it looks like you have a data grid which is dynamically resized which is in turn calling layout on data renderers. By the look of it, many times. There's also a number of forced reflows which is very bad for performance.
   
   Some suggestions:
   1. Use fixed sizing.
   2. Use a simpler layout bead.
   3. If you have a lot of data, use dynamic loading of data and / or renderers as they are needed for display.
   4. Look into why you are getting forced reflow and try to eliminate that. The best way to do that is to defer measuring until you are within a `requestAnimationFrame` handler.
   
   HTH...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] alinakazi commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
alinakazi commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-811761492


   Add Basic namespace    xmlns:js="library://ns.apache.org/royale/basic"
    where other namespaces are added on top. 
   You can also use mx:Beads same way. Below is just an example you can modify it the way you want. 
   
   <mx:AdvancedDataGrid id="dgProducts" dataProvider="{arrProductDP}" sortExpertMode="true" styleName="advancedDataGrid"
   rowHeight="20" verticalAlign="middle" horizontalScrollPolicy="auto" itemDoubleClick="fn_EditProduct(true);"
   maxWidth="{bcBill.width - 80}" top="241" bottom="103" left="5" right="80">
   **<js:beads>
                   <js:Paddings padding="30"/>
                   <js:VerticalLayout gap="3"/>
               </js:beads>**
   <mx:AdvancedDataGridColumn dataField="S No." headerText="S No." width="50" labelFunction="fn_GetSNo"/>
   	<mx:AdvancedDataGridColumn dataField="productCode" headerText="Product Code" width="120" labelFunction="CallingDocListFunction8"/>
   	<mx:AdvancedDataGridColumn dataField="productDesc" headerText="Description" width="150"/>
   	<mx:AdvancedDataGridColumn dataField="pbdStoreCode" headerText="Store Code" width="120" labelFunction="CallingDocListFunction4"/>
   	<mx:AdvancedDataGridColumn dataField="pbdStoreDesc" headerText="Description" width="150"/>
   	<mx:AdvancedDataGridColumn dataField="prodUnitDesc" headerStyleName="centered" headerText="Unit" width="100"/>
   	<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Qty Ordered" dataField="pbdQtyOrdered"
   							   width="100" id="dgcQtyOrdered" labelFunction="CallingDocListFunction2"/>
   	<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Qty Received" dataField="pbdQtyReceived"
   							   width="100" id="dgcQtyReceived" labelFunction="CallingDocListFunction5"/>
   	<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Sepcific Temp" dataField="pbdObsSpecificTemp" width="95" id="dgcObsSpecificTemp"
   								labelFunction="CallingDocListFunction5"/>
   	<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Rate" id="dgcRate"
   								dataField="pbdRate" width="100" labelFunction="CallingDocListFunction2" />
   	<mx:AdvancedDataGridColumn textAlign="right" headerStyleName="centered" headerText="Value" 
   								id="dgcValue" dataField="pbdValue" width="100" 
   								labelFunction="CallingDocListFunction6"/>....................
   
   If you need horizontal gap try 
     <js:HorizontalLayout gap="10"/>
   
   HTH.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [royale-asjs] alinakazi commented on issue #1097: Documents Loading too Slow Compared to Flex

Posted by GitBox <gi...@apache.org>.
alinakazi commented on issue #1097:
URL: https://github.com/apache/royale-asjs/issues/1097#issuecomment-811762690


   <js:beads>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org