SlideShare a Scribd company logo
1 of 23
WPF/ XamDataGrid
          Performance
Kiril Matev
Technical Evangelist
Infragistics, Inc
kmatev@infragistics.com
Contents
•   Application Resources
•   Layouts & Templates
•   Data Binding
•   Converter vs. DataTemplateSelector
•   XamDataGrid-specific optimizations
    – UI Virtualization
    – Themes and styles
    – Real-time updates
• Initial Loading Time (preloading and NGEN)
Application Resources
• Load relevant resources at the view level
  (as opposed to on the application level)
• Use shared resource definitions on the
  Window/Application level
• Use static resources rather than dynamic
  ones to save on lookups at runtime
Layouts & Templates
•   Reduce the number of visual elements
•   Use virtualized container with recycling
•   Refrain from using BitmapEffects
•   Set the neutral culture using
    NeutralResourcesLanguageAttribute to
    prevent lookup of satellite assemblies
Data Binding
• Fix binding errors to prevent expensive
  binding path resolutions
• Binding to many properties of an object is
  expensive compared to binding to few
  properties of many objects
• Test with 1000 textboxes
  – Bound to 1 object’s 1000 properties – 950ms
  – Bound to 1000 objects 1 property – 115ms
Data Binding
• Bind to IList rather than
  IEnumerable, because the CLR generates
  an IList to wrap it

• For adding/removing data from data
  sources, bind to ObservableCollection<T>
  rather than IList
Convertor vs DataTemplateSelector
• Use Convertors instead of
  DataTemplateSelectors
  – Added flexibility in specifying business logic
  – Slightly better performance
• For virtualized control, the convertors will
  be invoked for each cell coming into view,
• Apply processing in code-behind and bind
  to transformed/formatted data
Convertor Limitations
• For virtualized item controls, the
  conversion logic will be invoked for each
  cell coming into view
• Avoid unbound columns and convertors -
  apply processing in code-behind and bind
  to transformed data
• Apply formatting using styles rather than
  converters, e.g. date or time formatting
XamDataGrid UI Virtualization
• XamDataGrid supports virtualization
  modes on the row and column level to
  help you adjust performance for your
  specific scenarios
• You can customize the virtualization
  setting using the
  RecordContainerGenerationMode and
  CellContainerGenerationMode properties
XamDataGrid Virtualization Modes
• Recycle
  – Reuses the same visual elements, binding
    them to data items as they are scrolled into
    view
  – Minimize space requirement at the expense of
    time
  – Suitable for high-volume data scenarios with
    simple UI controls in the cells
XamDataGrid Virtualization Modes
• PreLoad
  – Initialize visual elements to represent the
    entire dataset
  – Improve runtime performance at the expense
    of space and startup time
  – Useful when you require smooth scrolling
    over a relatively small dataset, and you have
    user controls hosted in the control with
    expensive initialization/formatting applied
XamDataGrid Virtualization Modes
• LazyLoad
  – Initialize visual elements to represent the visible
    dataset, adding new ones to represent data
    subsequently brought into view
  – Minimum space at startup, increasing space
    footprint, accessing cells that have been in view
    is fast
  – Useful when you require smooth scrolling over a
    relatively small dataset, and you have user
    controls hosted in the control with expensive
    initialization/formatting applied
XamDataGrid Event Suppress
• Suppress unused routed events to
  improves performance due to the
  overhead incurred with routed events in
  element hierarchies.

• There are also direct CLR events added
  for common routed events on the
  DataPresenterBase.
XamDataGrid Themes & Styles
• Set the Theme property to prevent
  overhead in template lookup
  – Implications for preloading
• Use a hover-less theme to prevent row
  highlighting on mouse hover
XamDataGrid Real-Time Updates
• Using INotifyPropertyChanged on the
  property level (usual MVVM setup)
  – Useful for sparse updates, good for most cases
  – One event updates one bound column
• Using INotifyPropertyChanged on the row
  level
  – Useful for scenarios where all the properties in a
    row are changed. This updates the entire row
    using a single property changed notification,
    instead of raising N property changed events
  – One event updates an entire row
XamDataGrid Real-Time Updates
• Using CollectionChanged.Reset for
  frequent and extensive data updates
  – Useful for scenarios where the underlying
    datasource changes dramatically – e.g. a new
    batch of rows come in from a backend system
  – One event updates the entire grid
XamDataGrid ReadOnly Style
• Using the read-only cell style (provided on
  my blog), you can get a radically simpler
  CellValuePresenter style, which improves
  performance
• It does not render editors for cells in edit
  mode,
• Setting EditAsType the same type for all
  XamDataGrid fields facilitates cell
  virtualization
Initial Loading Time - Preloading
• Preloading XamDataGrid (and any other
  Infragistics controls) in a window not
  shown to the user pays upfront the cost of
  JIT-compiling the XamDataGrid
• This causes user-initiated opening of a
  window containing the XamDataGrid to be
  much faster
• Approach is described here
Initial Loading Time - NGEN
• The JIT compiler compiles methods as
  required during execution
  – Takes up CPU time
  – Compiled code cannot be shared among
    processes
Initial Loading Time - NGEN
• Using NGEN to create pre-compiled (native)
  images of Infragistics DLLs to eliminate JIT-
  compilation
  – Reduces the memory footprint
     • JIT compiler does not need to be loaded in memory)
     • Native images can be shared among processes
  – Improves loading time in warm startup scenarios
  Note: NGEN’ed assemblies need to be in the
  GAC on the client machine in order to avoid
  costly strong-name validation procedure.
Questions
Resources
Optimizing XamDataGrid performance
http://blogs.infragistics.com/blogs/kiril_matev/archive/2010/10/26/optimizing-xamdatagrid-
performance.aspx

Optimizing WPF Application Performance
http://msdn.microsoft.com/en-us/library/aa970683.aspx
Contacts
kmatev@infragistics.com

More Related Content

What's hot

Genetics factor in development of malocclusion (final)
Genetics factor in development of malocclusion (final)Genetics factor in development of malocclusion (final)
Genetics factor in development of malocclusion (final)Indian dental academy
 
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...Principles and concept of andrew’s preadjusted edgewise appliance /certified ...
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...Indian dental academy
 
Chondrogenesis Oral Report Updated
Chondrogenesis Oral Report UpdatedChondrogenesis Oral Report Updated
Chondrogenesis Oral Report Updatedbunger123
 
Elastics in Orthodontics -part I
Elastics in Orthodontics -part IElastics in Orthodontics -part I
Elastics in Orthodontics -part IKunal Ajay Patankar
 
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...Indian dental academy
 
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy Nutrition part1 /certified fixed orthodontic courses by Indian dental academy
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy Indian dental academy
 
orthodontic Wire bending principles / orthodontic courses /certified fixed or...
orthodontic Wire bending principles / orthodontic courses /certified fixed or...orthodontic Wire bending principles / orthodontic courses /certified fixed or...
orthodontic Wire bending principles / orthodontic courses /certified fixed or...Indian dental academy
 
Current controversies in orthodontics
Current controversies in orthodonticsCurrent controversies in orthodontics
Current controversies in orthodonticsIndian dental academy
 
Artificial Intelligence in Life Sciences and Agriculture.
Artificial Intelligence in Life Sciences and Agriculture.Artificial Intelligence in Life Sciences and Agriculture.
Artificial Intelligence in Life Sciences and Agriculture.Yannick Djoumbou
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Indian dental academy
 
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...Temporomandibular joint /certified fixed orthodontic courses by Indian dental...
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...Indian dental academy
 
Space closure /certified fixed orthodontic courses by Indian dental academy
Space closure /certified fixed orthodontic courses by Indian dental academy Space closure /certified fixed orthodontic courses by Indian dental academy
Space closure /certified fixed orthodontic courses by Indian dental academy Indian dental academy
 
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...Indian dental academy
 
Advanced Analytics and Data Science Expertise
Advanced Analytics and Data Science ExpertiseAdvanced Analytics and Data Science Expertise
Advanced Analytics and Data Science ExpertiseSoftServe
 
Methods of study bone growth /certified fixed orthodontic courses by Indian d...
Methods of study bone growth /certified fixed orthodontic courses by Indian d...Methods of study bone growth /certified fixed orthodontic courses by Indian d...
Methods of study bone growth /certified fixed orthodontic courses by Indian d...Indian dental academy
 
3. bonding in orthodontics
3. bonding in orthodontics3. bonding in orthodontics
3. bonding in orthodonticsDr. Lohith D
 

What's hot (20)

Genetics factor in development of malocclusion (final)
Genetics factor in development of malocclusion (final)Genetics factor in development of malocclusion (final)
Genetics factor in development of malocclusion (final)
 
Modern begg technique
Modern begg techniqueModern begg technique
Modern begg technique
 
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...Principles and concept of andrew’s preadjusted edgewise appliance /certified ...
Principles and concept of andrew’s preadjusted edgewise appliance /certified ...
 
Chondrogenesis Oral Report Updated
Chondrogenesis Oral Report UpdatedChondrogenesis Oral Report Updated
Chondrogenesis Oral Report Updated
 
Elastics in Orthodontics -part I
Elastics in Orthodontics -part IElastics in Orthodontics -part I
Elastics in Orthodontics -part I
 
Bonding to unconventional surfaces
Bonding to unconventional surfacesBonding to unconventional surfaces
Bonding to unconventional surfaces
 
NITI wires
NITI wiresNITI wires
NITI wires
 
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...
Esthetic orthodontic brackets /certified fixed orthodontic courses by Indian ...
 
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy Nutrition part1 /certified fixed orthodontic courses by Indian dental academy
Nutrition part1 /certified fixed orthodontic courses by Indian dental academy
 
Pain and orthodontics
Pain and orthodonticsPain and orthodontics
Pain and orthodontics
 
orthodontic Wire bending principles / orthodontic courses /certified fixed or...
orthodontic Wire bending principles / orthodontic courses /certified fixed or...orthodontic Wire bending principles / orthodontic courses /certified fixed or...
orthodontic Wire bending principles / orthodontic courses /certified fixed or...
 
Current controversies in orthodontics
Current controversies in orthodonticsCurrent controversies in orthodontics
Current controversies in orthodontics
 
Artificial Intelligence in Life Sciences and Agriculture.
Artificial Intelligence in Life Sciences and Agriculture.Artificial Intelligence in Life Sciences and Agriculture.
Artificial Intelligence in Life Sciences and Agriculture.
 
Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy Epigenetics /certified fixed orthodontic courses by Indian dental academy
Epigenetics /certified fixed orthodontic courses by Indian dental academy
 
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...Temporomandibular joint /certified fixed orthodontic courses by Indian dental...
Temporomandibular joint /certified fixed orthodontic courses by Indian dental...
 
Space closure /certified fixed orthodontic courses by Indian dental academy
Space closure /certified fixed orthodontic courses by Indian dental academy Space closure /certified fixed orthodontic courses by Indian dental academy
Space closure /certified fixed orthodontic courses by Indian dental academy
 
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...
Elastics and elastomerics /certified fixed orthodontic courses by Indian dent...
 
Advanced Analytics and Data Science Expertise
Advanced Analytics and Data Science ExpertiseAdvanced Analytics and Data Science Expertise
Advanced Analytics and Data Science Expertise
 
Methods of study bone growth /certified fixed orthodontic courses by Indian d...
Methods of study bone growth /certified fixed orthodontic courses by Indian d...Methods of study bone growth /certified fixed orthodontic courses by Indian d...
Methods of study bone growth /certified fixed orthodontic courses by Indian d...
 
3. bonding in orthodontics
3. bonding in orthodontics3. bonding in orthodontics
3. bonding in orthodontics
 

Viewers also liked

Indian German Unity
Indian German UnityIndian German Unity
Indian German UnityAnkit Singh
 
Amran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemAmran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemEngineering Software Lab
 
Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Engineering Software Lab
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהPerforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהEngineering Software Lab
 
Nunit C# source code defects report by Parasoft dotTEST
Nunit  C# source code  defects report by Parasoft dotTEST Nunit  C# source code  defects report by Parasoft dotTEST
Nunit C# source code defects report by Parasoft dotTEST Engineering Software Lab
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveEngineering Software Lab
 
CppUnit using introduction
CppUnit using introductionCppUnit using introduction
CppUnit using introductionIurii Kyian
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++TestEngineering Software Lab
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective Engineering Software Lab
 

Viewers also liked (19)

Indian German Unity
Indian German UnityIndian German Unity
Indian German Unity
 
A Scalable Software Build Accelerator
A Scalable Software Build AcceleratorA Scalable Software Build Accelerator
A Scalable Software Build Accelerator
 
המסדרת הפכה למגוהצת
המסדרת הפכה למגוהצתהמסדרת הפכה למגוהצת
המסדרת הפכה למגוהצת
 
Amran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystemAmran Tuberi - the damage of cycling to the desert ecosystem
Amran Tuberi - the damage of cycling to the desert ecosystem
 
Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...Parasoft Concerto A complete ALM platform that ensures quality software can b...
Parasoft Concerto A complete ALM platform that ensures quality software can b...
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורהPerforce עשרת היתרונות המובילים של מערכת ניהול התצורה
Perforce עשרת היתרונות המובילים של מערכת ניהול התצורה
 
Parasoft fda software compliance part2
Parasoft fda software compliance   part2Parasoft fda software compliance   part2
Parasoft fda software compliance part2
 
Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST
 
Nunit C# source code defects report by Parasoft dotTEST
Nunit  C# source code  defects report by Parasoft dotTEST Nunit  C# source code  defects report by Parasoft dotTEST
Nunit C# source code defects report by Parasoft dotTEST
 
Parasoft fda software compliance part1
Parasoft fda software compliance   part1Parasoft fda software compliance   part1
Parasoft fda software compliance part1
 
Palamida Open Source Compliance Solution
Palamida Open Source Compliance Solution Palamida Open Source Compliance Solution
Palamida Open Source Compliance Solution
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspective
 
FDA software compliance 2016
FDA software compliance 2016FDA software compliance 2016
FDA software compliance 2016
 
CppUnit using introduction
CppUnit using introductionCppUnit using introduction
CppUnit using introduction
 
Unit testing on embedded target with C++Test
Unit testing on embedded  target with C++TestUnit testing on embedded  target with C++Test
Unit testing on embedded target with C++Test
 
Embedded System Test Automation
Embedded System Test AutomationEmbedded System Test Automation
Embedded System Test Automation
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
 
Cpp unit
Cpp unit Cpp unit
Cpp unit
 

Similar to Optimize XamDataGrid Performance

Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructureharendra_pathak
 
State management 1
State management 1State management 1
State management 1singhadarsh
 
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at UberWSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at UberWSO2
 
MongoDB at MapMyFitness
MongoDB at MapMyFitnessMongoDB at MapMyFitness
MongoDB at MapMyFitnessMapMyFitness
 
ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7Phil Pursglove
 
Real time architecture big data
Real time architecture big dataReal time architecture big data
Real time architecture big dataSanjeev Solanki
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Jelastic Multi-Cloud PaaS
 
Development of concurrent services using In-Memory Data Grids
Development of concurrent services using In-Memory Data GridsDevelopment of concurrent services using In-Memory Data Grids
Development of concurrent services using In-Memory Data Gridsjlorenzocima
 
Simulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightningSimulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightningCloudLightning
 
Prediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearnPrediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearnJosef A. Habdank
 
ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordPhil Pursglove
 
Webinar: SQL for Machine Data?
Webinar: SQL for Machine Data?Webinar: SQL for Machine Data?
Webinar: SQL for Machine Data?Crate.io
 
Graphene – Microsoft SCOPE on Tez
Graphene – Microsoft SCOPE on Tez Graphene – Microsoft SCOPE on Tez
Graphene – Microsoft SCOPE on Tez DataWorks Summit
 
Data has a better idea the in-memory data grid
Data has a better idea   the in-memory data gridData has a better idea   the in-memory data grid
Data has a better idea the in-memory data gridBogdan Dina
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudDavid Veksler
 
High Performance Computing with AWS
High Performance Computing with AWSHigh Performance Computing with AWS
High Performance Computing with AWSAmazon Web Services
 
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...SQUADEX
 
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...DataStax Academy
 
IBM Maximo Performance Tuning
IBM Maximo Performance TuningIBM Maximo Performance Tuning
IBM Maximo Performance TuningFMMUG
 

Similar to Optimize XamDataGrid Performance (20)

Architectures, Frameworks and Infrastructure
Architectures, Frameworks and InfrastructureArchitectures, Frameworks and Infrastructure
Architectures, Frameworks and Infrastructure
 
State management 1
State management 1State management 1
State management 1
 
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at UberWSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
WSO2Con USA 2017: Scalable Real-time Complex Event Processing at Uber
 
MongoDB at MapMyFitness
MongoDB at MapMyFitnessMongoDB at MapMyFitness
MongoDB at MapMyFitness
 
ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7ASP.NET Scalability - DDD7
ASP.NET Scalability - DDD7
 
Real time architecture big data
Real time architecture big dataReal time architecture big data
Real time architecture big data
 
Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...Running Java Applications inside Kubernetes with Nested Container Architectur...
Running Java Applications inside Kubernetes with Nested Container Architectur...
 
Development of concurrent services using In-Memory Data Grids
Development of concurrent services using In-Memory Data GridsDevelopment of concurrent services using In-Memory Data Grids
Development of concurrent services using In-Memory Data Grids
 
Simulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightningSimulating Heterogeneous Resources in CloudLightning
Simulating Heterogeneous Resources in CloudLightning
 
Prediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearnPrediction as a service with ensemble model in SparkML and Python ScikitLearn
Prediction as a service with ensemble model in SparkML and Python ScikitLearn
 
ASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen OxfordASP.NET Scalability - NxtGen Oxford
ASP.NET Scalability - NxtGen Oxford
 
Webinar: SQL for Machine Data?
Webinar: SQL for Machine Data?Webinar: SQL for Machine Data?
Webinar: SQL for Machine Data?
 
Operational-Analytics
Operational-AnalyticsOperational-Analytics
Operational-Analytics
 
Graphene – Microsoft SCOPE on Tez
Graphene – Microsoft SCOPE on Tez Graphene – Microsoft SCOPE on Tez
Graphene – Microsoft SCOPE on Tez
 
Data has a better idea the in-memory data grid
Data has a better idea   the in-memory data gridData has a better idea   the in-memory data grid
Data has a better idea the in-memory data grid
 
Nuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloudNuts and bolts of running a popular site in the aws cloud
Nuts and bolts of running a popular site in the aws cloud
 
High Performance Computing with AWS
High Performance Computing with AWSHigh Performance Computing with AWS
High Performance Computing with AWS
 
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
Tooling for Machine Learning: AWS Products, Open Source Tools, and DevOps Pra...
 
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...
C* Summit 2013: Large Scale Data Ingestion, Processing and Analysis: Then, No...
 
IBM Maximo Performance Tuning
IBM Maximo Performance TuningIBM Maximo Performance Tuning
IBM Maximo Performance Tuning
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Optimize XamDataGrid Performance

  • 1. WPF/ XamDataGrid Performance Kiril Matev Technical Evangelist Infragistics, Inc kmatev@infragistics.com
  • 2. Contents • Application Resources • Layouts & Templates • Data Binding • Converter vs. DataTemplateSelector • XamDataGrid-specific optimizations – UI Virtualization – Themes and styles – Real-time updates • Initial Loading Time (preloading and NGEN)
  • 3. Application Resources • Load relevant resources at the view level (as opposed to on the application level) • Use shared resource definitions on the Window/Application level • Use static resources rather than dynamic ones to save on lookups at runtime
  • 4. Layouts & Templates • Reduce the number of visual elements • Use virtualized container with recycling • Refrain from using BitmapEffects • Set the neutral culture using NeutralResourcesLanguageAttribute to prevent lookup of satellite assemblies
  • 5. Data Binding • Fix binding errors to prevent expensive binding path resolutions • Binding to many properties of an object is expensive compared to binding to few properties of many objects • Test with 1000 textboxes – Bound to 1 object’s 1000 properties – 950ms – Bound to 1000 objects 1 property – 115ms
  • 6. Data Binding • Bind to IList rather than IEnumerable, because the CLR generates an IList to wrap it • For adding/removing data from data sources, bind to ObservableCollection<T> rather than IList
  • 7. Convertor vs DataTemplateSelector • Use Convertors instead of DataTemplateSelectors – Added flexibility in specifying business logic – Slightly better performance • For virtualized control, the convertors will be invoked for each cell coming into view, • Apply processing in code-behind and bind to transformed/formatted data
  • 8. Convertor Limitations • For virtualized item controls, the conversion logic will be invoked for each cell coming into view • Avoid unbound columns and convertors - apply processing in code-behind and bind to transformed data • Apply formatting using styles rather than converters, e.g. date or time formatting
  • 9. XamDataGrid UI Virtualization • XamDataGrid supports virtualization modes on the row and column level to help you adjust performance for your specific scenarios • You can customize the virtualization setting using the RecordContainerGenerationMode and CellContainerGenerationMode properties
  • 10. XamDataGrid Virtualization Modes • Recycle – Reuses the same visual elements, binding them to data items as they are scrolled into view – Minimize space requirement at the expense of time – Suitable for high-volume data scenarios with simple UI controls in the cells
  • 11. XamDataGrid Virtualization Modes • PreLoad – Initialize visual elements to represent the entire dataset – Improve runtime performance at the expense of space and startup time – Useful when you require smooth scrolling over a relatively small dataset, and you have user controls hosted in the control with expensive initialization/formatting applied
  • 12. XamDataGrid Virtualization Modes • LazyLoad – Initialize visual elements to represent the visible dataset, adding new ones to represent data subsequently brought into view – Minimum space at startup, increasing space footprint, accessing cells that have been in view is fast – Useful when you require smooth scrolling over a relatively small dataset, and you have user controls hosted in the control with expensive initialization/formatting applied
  • 13. XamDataGrid Event Suppress • Suppress unused routed events to improves performance due to the overhead incurred with routed events in element hierarchies. • There are also direct CLR events added for common routed events on the DataPresenterBase.
  • 14. XamDataGrid Themes & Styles • Set the Theme property to prevent overhead in template lookup – Implications for preloading • Use a hover-less theme to prevent row highlighting on mouse hover
  • 15. XamDataGrid Real-Time Updates • Using INotifyPropertyChanged on the property level (usual MVVM setup) – Useful for sparse updates, good for most cases – One event updates one bound column • Using INotifyPropertyChanged on the row level – Useful for scenarios where all the properties in a row are changed. This updates the entire row using a single property changed notification, instead of raising N property changed events – One event updates an entire row
  • 16. XamDataGrid Real-Time Updates • Using CollectionChanged.Reset for frequent and extensive data updates – Useful for scenarios where the underlying datasource changes dramatically – e.g. a new batch of rows come in from a backend system – One event updates the entire grid
  • 17. XamDataGrid ReadOnly Style • Using the read-only cell style (provided on my blog), you can get a radically simpler CellValuePresenter style, which improves performance • It does not render editors for cells in edit mode, • Setting EditAsType the same type for all XamDataGrid fields facilitates cell virtualization
  • 18. Initial Loading Time - Preloading • Preloading XamDataGrid (and any other Infragistics controls) in a window not shown to the user pays upfront the cost of JIT-compiling the XamDataGrid • This causes user-initiated opening of a window containing the XamDataGrid to be much faster • Approach is described here
  • 19. Initial Loading Time - NGEN • The JIT compiler compiles methods as required during execution – Takes up CPU time – Compiled code cannot be shared among processes
  • 20. Initial Loading Time - NGEN • Using NGEN to create pre-compiled (native) images of Infragistics DLLs to eliminate JIT- compilation – Reduces the memory footprint • JIT compiler does not need to be loaded in memory) • Native images can be shared among processes – Improves loading time in warm startup scenarios Note: NGEN’ed assemblies need to be in the GAC on the client machine in order to avoid costly strong-name validation procedure.