Ticket #2385 (new defect)

Opened 8 years ago

Improve performance of widget visibility control

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.5.7
Component: CPSSchemas Version: 3.5.2
Severity: normal Keywords: datastructure widget optimization


In some cases, the visibility control of widgets can depend on external factors which may be quite costly.

In the current API, the getWidgetModeFromLayoutMode method of the widget class is in charge of this and takes layout_mode and datamodel as arguments. It would be interesting to pass (optionally) the datastructure as well, as a way to mutualize information between widgets : this is indeed the preferred communication means between widgets. Using the datamodel for that same purpose is more dangerous, because datamodels may be reused, while datastructure is for one and only one bunch of layout renderings.

I do have a use-case with hundreds of widgets depending on some external condition which could be evaluated once.

Note: See TracTickets for help on using tickets.