OutSystems Performance - Static Entities vs Dynamic Entities

Marco Arede
3 min readDec 3, 2019

As developers we need to be on top of many topics about performance, to develop great applications. In case you’ve missed some, let me share with you some tips. This article is about Static Entities performance in OutSystems!

Static Entities are used several times throughout OutSystems projects. They hold data which is usually related to enumerated values. This information is stored in a database, it does not change at run-time (only programmatically), and can be fetched using an Aggregate or the Entity Get Method.

Dynamic Entities, in a similar way, hold data that can be managed dynamically (at run-time) with CRUD actions. The information stored in the database, can also be fetched by an Aggregate or the Entity Get Method.

Static and Dynamic Entities representation example.

Static Entity: holds values that do not change often. Dynamic Entity: holds values that can change during time.

To compare their performance, I’ve measured several times the loading duration of several heavy pages (intensive usage of database queries), under load stress (intensive number of simultaneous page access), divided in two groups of pages (Static and Dynamic Entities usages only), and a distinct number of database queries (from one to hundreds). The data collected was important to understand the difference of performance between Static and Dynamic Entities.

Results conclusions, using Static Entities instead of Dynamic Entities, the benefits were: an increase of 5% in performance (for pages with one call to the database); and an increase of 75% in performance (for pages with hundreds of calls to the database).

Pages loads duration vs number of queries, using Static vs Dynamic Entities.

Benefit: an increase of performance between 5% and 75%, when using Static Entities instead of Dynamic Entities, in heavy pages under load stress.

Out of the box, OutSystems Platform provides an optimization mechanism to fetch database results of Static Entities. This increases the chances of having a better performance, using a Static Entity compared to using a Dynamic Entity.

Practical applications of these conclusions, could be for example, in a portal application accessed by thousands of users, when loading pages and lists of values containing several results from database, where most of its data could be considered static. Such pages can be good candidates for optimization, by giving preference to use more Static Entities results instead of Dynamic Entities ones.

Useful in pages with lists, holding several database results, where most data could be considered as static. These are good candidates to optimize, using mostly Static Entities.

As a final note, these performance benefits above described, were obtained using this context: pages using Static or Dynamic Entities only; pages containing one or more database calls; pages under a stress of load; several measurements taken; OutSystems personal environment (v.11.6.11).

Do you think this is interesting? Share this! Do you have a question? Just ask me! Additional reading about Static Entities can be found on the OutSystems website.

--

--

Marco Arede

OutSystems MVP | Freelance Developer, Tech Lead, Architect | Bringing Innovative Applications to Life using Low Code | Working @ Digitally Lean BV