Community
Participate
Working Groups
Build Identifier: 0.7.0.v201109292101 You'll see a couple of seconds are spent to drag a new type of widget (one widget has not been dragged to the VE before), which annoys user. Reproducible: Always
Add Ji Yong in the copy list Every time add a new widget in the Handler, it will render the whole page, that make it slow. JS runtime should provide a new dynamic loading mechanism first since the generated HTML is different of RBD.
*** Bug 359355 has been marked as a duplicate of this bug. ***
Created attachment 204857 [details] Patch Here is a patch. Thanks.
Hi team, The change for 359508 has been checked in, below is how the js dynamic loading works in VE. For Widget and Handler, the RED codes are generated into "eze$$setInitial" method to dynamically load the missed js files and css files, below is an example: "eze$$setInitial" : function () { try { egl.enter( "<init>" , this ,arguments); egl.loadScript( "org.eclipse.edt.rui.widgets" , "GridLayout" ); egl.loadScript( "org.eclipse.edt.rui.widgets" , "GridLayoutData" ); egl.loadScript( "org.eclipse.edt.rui.widgets" , "TextField" ); egl.loadScript( "org.eclipse.edt.rui.widgets" , "Button" ); egl.loadScript( "com.services" , "MyLib" ); egl.loadCSS( "css/ProjectA.css" ); this .eze$$setEmpty(); egl.atLine( this .eze$$fileName,17,431,11, this ); this .ui.setColumns(3); Widget/Handler contains egl.loadScript only for directly referenced parts. Below is an execution flow example: Three parts: HandlerA, WidgetB, LibraryC HandlerA initially doesn't contain WidgetB and LibraryC. WidgetB references LibraryC. 1. HandlerA is showing in VE 2. Drag WidgetA into HandlerA in Design view, or add WidgetA into HandlerA in Sourve view 3. HandlerA is generated into js, containing below egl.loadScript code egl.loadScript( "widgets.pkg", " WidgetA " ); 4. VE destroys HandlerA instance and reload the new HandlerA.js and re-instance a new HandlerA 5. When the code in step 3 is executed, the WidgetA.js will be load 6. WidgetA.js contains below egl.loadScript code egl.loadScript( "lib.pkg", " LibraryC " ); 7. When a WidgetA instance is created, the code in step 6 is executed, and LibraryC.js is loaded 8. Drag a new WidgetA into HandlerA, new HandlerA.js is generated 9. VE destroys HandlerA instance and reload the new HandlerA.js and re-instance a new HandlerA 10. the code in step 3 is executed, but the WidgetA.js is loaded, so it returns immediately. 11. If there is any error when loading a js, the whole page will be reloaded.
Verified in 0.7.0.v201110110900. Thanks Jimmy for your great work. I do see the improvements, but I think it would be better if you can provide an accurate improvement number with your fix.
Created attachment 205081 [details] Patch 2 A new fix. Thanks.