Static Optimization
Static optimization is a technique used in HMWIN Studio to improve run-time performance.
Using a lot of images and pictures in a project might degrade performances, static optimization merges several images into
a single background image thus reducing rendering and loading times. Using this method only one raster image needs to be
loaded and rendered instead of many single raster and/or vector images.
When you create a project in HMWIN Studio, the pages might contain widgets such as texts, images, background images,
background colors and so on which can be classified as:
l Static: values or properties do not change at run time.
l Dynamic: values or properties change at run time.
Note: Based on security settings, static parts of widgets could be not merged to background. This happens
when a widget is configured as “hide” in security settings.
Important: When you change the properties of widgets with JavaScript set the widget Static
Optimization to Dynamic, otherwise changes to properties will be ignored.
When downloading or validating a project, HMWIN Studio identifies static components and renders them as background
images to .png files. These background images are saved as a part of the project under the folder /opt.
Background images can be created as follows:
l full page background images, containing all widgets merged to page background
l group background images, containing a group of static widgets merged together to form a group background. For
example, the Gauge group is normally composed by a background, a scale, a label and a needle, where background
scale and label can all be merged to a single background image.
The Static Optimization page attribute enables and disables static optimization of the whole page. If it is set to false the
optimization is totally disabled.
Finer control can be achieved setting the Static Optimization attribute of each single widget as follows:
l Normal: HMWIN Studio automatically detects if the widget can be merged with the background. This can be used if
the widget is not a dynamic widget and does not overlap, that is it is not stacked above, a dynamic widget.
l Static: The image is forced to be merged with the background. This can be used when the static widget overlaps a
dynamic transparent widget.
Note: In this case the automatic optimization will fail because it does not make any assumption on invisible
areas which might be rendered at run time.
l Dynamic: The widget is not optimized at all. Use this flag when a static widget needs to be changed by Javascript.
426
HMWIN Studio |User Manual|v206 (2017-06-30) |EN|© 2014-2017 Panasonic Electric Works Europe AG
Static Optimization