Bug 1033693

Summary: Overall loading time improvements for jBPM Designer
Product: [Retired] JBoss BPMS Platform 6 Reporter: Tihomir Surdilovic <tsurdilo>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED EOL QA Contact: Sona Mala <smala>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, pzapataf, rrajasek
Target Milestone: ER2   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 19:36:56 UTC Type: Task
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tihomir Surdilovic 2013-11-22 15:53:55 UTC
The goal of this BZ to add improvements to the initial and consecutive loading times of designer in the workbench. Some of the ideas include:

* compression of all minimized JS files into a single gzipped one.
* using of image strips instead of individual images for the designer toolbar etc
* on-demand loading of JS libraries when editors/features are requested by the user that need it instead of loading them up-front
* please add more here as applicable

Comment 1 Kris Verlaenen 2013-12-12 23:26:04 UTC
Since severity is medium, this might be addressed as part of 6.0.1

Comment 3 Pedro Zapata 2014-05-19 15:59:00 UTC
This issue should take high priority for Openshift, Freemodeler and cloud deployments, since the loading of a simple process over a internet connection creates great delays, which greatly hurts usability.

For example, loading a process involves about 223 different HTTP requests, summarized as follows (tested in 6.0.1 version)

223 requests
  2 documents
  10 stylesheets
  121 images
  12 scripts
  78 SVG and others (Errai)


Of course, this creates a big server overload and also a big delay in opening the process.

Can you please confirm whether this has been targeted for 6.1 ?

Comment 4 Pedro Zapata 2014-06-03 09:48:46 UTC
For Freemodeler, we have applied the following strategy as a local patch, to both Designer and the underlying ORYX library.

#1 Load top toolbar icons from a single PNG sprite instead of multiple requests.
#2 Load left BPMN palette icons from a single PNG sprite.
#3 Load SVG BPMN elements from a single SVG instead of multiple individual SVGs requests. To implement this, a simple project specific SVG concatenation and transformation tool was created (SVGSpriteGenerator.java).

Modification #3 is the one with higher potential for time saving, given the SVG load requests are not paralellized but are done programatically in a JS loop. 

With these changes, load time for the request above has been reduced from 223 requests to around 60 requests. Load time has been reduced from 25-30 sec to 10-15 sec in the worst case. It's also important to clarify these number include Designer and Uberfire request mixed together.

Source code for this modifications is at:
https://github.com/jboss-integration/freemodeler/tree/master/freemodeler-designer-extensions

These ideas can be applied to product as well, given it's possible to modify the underlying ORYX framework or upgrade it to a higher version that supports sprite loading.

Comment 6 Tihomir Surdilovic 2014-07-11 15:20:43 UTC
We have implemented (and are currently) testing the embedding of svg definitions of nodes into the stencil set and the image sprite use for icons in the toolbar and stencil set. 

We will be doing performance measurements shortly and update this BZ with findings. 

The implementations are different than what is shown by Pedro but follow the same principles.

Comment 7 Jeremy Lindop 2014-09-16 13:09:32 UTC
https://github.com/droolsjbpm/jbpm-designer/commit/4b7042e222257b8d696368530ec794eacaefd159

We have implemented performance enhancements as follows:

#1 Load top toolbar icons from a single PNG sprite instead of multiple requests.
#2 Load left BPMN palette icons from a single PNG sprite.
#3 Load icons in the simulation pages from a single PNG sprite.
#4 Load morph-shape icons in the diagram editor from a single PNG sprite.
#5 Embed SVG BPMN elements in the main BPMN stencilset instead of multiple individual SVGs requests.

With these enhancements, the number of http requests when opening a Business Process has fallen from 208 to 67.

Comment 9 Jeremy Lindop 2014-09-19 08:39:32 UTC
Further commit to fix bug when running in bpms war built by kie-wb-distributions:

https://github.com/droolsjbpm/jbpm-designer/commit/3d34490223ce93918e2eefc691d620626807059a

Comment 10 Sona Mala 2014-12-08 14:44:26 UTC
It seems that jBPM Designer is loaded in 7 seconds.