Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

What is the performance impact of using SLProtocolExt?

Solved1.52K views20th October 2023QActions SLProtocol SLProtocolExt
13
Edib Šupić [SLC] [DevOps Catalyst]2.05K 19th October 2023 0 Comments

What is the overhead of using SLProtocolExt instead of SLProtocol? Since SLProtocolExt is superset of SLProtocol, object of type ConcreteSLProtocolExt is naturally larger then ConcreteSLProtocol. How big of an performance impact is this and what are the cases where this overhead needs to be considered?

Once decision is made to use SLProtocolExt instead of SLProtocol, does number of QActions that use SLProtocolExt matter, or does every QAction use the same instance of ConcreteSLProtocolExt, which gets instantiated on the call to the first QAction that needs it? More generally does new ConcreteSLProtocol object get instantiated for every call to QAction?

Tom Waterbley [SLC] [DevOps Catalyst] Answered question 19th October 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
13
Laurens Moutton [SLC] [DevOps Enabler]8.68K Posted 19th October 2023 4 Comments

Hi,

The overhead of SLProtocolExt is that all parameter types are added on the memory heap, these need to be constructed first, and for somebody that needs to debug an SLScripting memory dump it will be harder for them to dig through all the items: imagine if a protocol.xml has 5000 parameters that somebody that is checking the heap sees these 5000 items next to the basic types like string, int,...

Every QAction has their own SLProtocol object, this is not shared. A perfect example of this is the protocol.GetTriggerParameter() call, when all QActions would be using the same SLProtocol object then the result of this call would be the same for every QAction. Further, a new SLProtocol object gets instantiated at every QAction run.

To summarize: using SLProtocol over SLProtocolExt is preferred, specially when the SLProtocolExt members are not being used, as SLProtocol is faster to load when starting a QAction and will not take up as much space on the heap in memory.

[Edit]: summary after taking a deeper look (see comments):

SLProtocolExt is a 'relatively' small performance hit in most cases and its fine to use if it's for readability and you actually use its features.

So if using the SLProtocolExt functionality is preferred then feel free to do so, but it’s a pity to define SLProtocolExt and then only use a basic GetParameter or SetParameter call that an SLProtocol object also offers. Executing one protocol.SetParameters call is also still preferred over multiple protocol.SetParameter calls, which does not happen when assigning values to single parameters when using SLProtocolExt.

Regards,

Laurens Moutton [SLC] [DevOps Enabler] Edited answer 20th October 2023
Edib Šupić [SLC] [DevOps Catalyst] commented 19th October 2023

Hi Laurens,
Thank you for the explanation. The part I don’t understand is “all parameter types” and “5000 items next to the basic types like string, int”. Does this mean that every parameter gets it’s own type in SLScripting? When I take a look at QAction_Helper all parameters are defined as of type “object”, but I guess it is possible that they are just boxed.

Laurens Moutton [SLC] [DevOps Enabler] commented 19th October 2023

When looking at the interface description of SLProtocolExt under https://docs.dataminer.services/develop/api/types/Skyline.DataMiner.Scripting.SLProtocolExt.html , there is written: suppose a protocol defines a table with name “Overview”, then the ProtocolExt interface will contain the following property:

public interface SLProtocolExt : SLProtocol
{
public OverviewQActionTable overview {get; set; };
}

The “OverviewQActionTable” is a new (class) type, similar like there are string or int types. Such a type will become visible on the heap.
Single parameters will be of the object type, so not their own type, but will have their own setter-getter implementation that will need to be generated and will be properties of the SLProtocolExt interface and class implementation.

The SLProtocolExt provides a more readable way of coding, but when having for example
protocol.First = 1; // Sets the value of the read parameter with name “First”.
protocol.Second = 2;
Then in this case it is more readable, but is not performant because 2 protocol.SetParameter (inter-process) calls need to happen in the background. It’s better to combine this into one protocol.SetParameters(new int[Parameter.First, Parameter.Second], new object[1,2]); call. That one is performant and makes use of the available “Parameter” class and does not need SLProtocolExt but can perfectly work with the SLProtocol object.

Tom Waterbley [SLC] [DevOps Catalyst] commented 19th October 2023

Hi Laurens. I’m actually not sure if extra memory is being allocated when using SLProtocolExt (for parameters). When looking at the implementation, it seems that all properties are implemented as methods, without backing field.

Example:
/// PID: 39 | Type: read
public System.Object Requestpatch {get { return GetParameter(39); }set { SetParameter(39, value); }}

Only for tables a small object is being allocated. The impact of these object is likely very small, and will never cause performance problems in practice. Personally I prefer more readable code over such micro-optimizations.

Laurens Moutton [SLC] [DevOps Enabler] commented 20th October 2023

I took a deeper dive into the memory heap. For single parameters there is indeed no backing field because the get and set call methods in the background. For table parameters there is a backing field of the type Skyline.DataMiner.Scripting.QActionTable that contains 3 properties (at this moment): link back to the SLProtocol object, tableId integer and tableName string. For one element this might not seem much, but when looking at a memory dump of SLScripting at a production setup there are a lot of tables across all elements on a DMA and those are a lot of objects that we are seeing on the memory heap. If using the SLProtocolExt functionality is preferred then feel free to do so, but it’s a pity to define SLProtocolExt and then only use a basic GetParameter or SetParameter call that an SLProtocol object also offers. Executing one protocol.SetParameters call is also still preferred over multiple protocol.SetParameter calls, which does not happen when assigning values to single parameters when using SLProtocolExt.

11
Tom Waterbley [SLC] [DevOps Catalyst]8.86K Posted 19th October 2023 0 Comments

Hi Edib. As Laurens already mentioned, there could be a small performance impact when using SLProtocolExt, because some objects are being allocated. However the impact is probably very small and will almost never be a problem in practice. Personally I prefer more readable code over such micro-optimizations. When performance becomes a problem there are most likely other things that can be improved that will have a much bigger impact. I always use SLProtocolExt, and as far as I'm aware it has never caused problems.

Tom Waterbley [SLC] [DevOps Catalyst] Edited answer 20th October 2023
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Multiple Set on Table parameters for DVE’s 0 Answers | 1 Vote
DOM Definition relations returned in Definition query 0 Answers | 1 Vote
Alarm Dashboard PDF/CSV Export 1 Answer | 0 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (108) Correlation (68) Cube (150) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) services (51) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin