SlideShare una empresa de Scribd logo
1 de 62
Having serious fun with LWC Datatable
and Large Data Volume
by Christian Szandor Knapp
& Christian Menzinger
#CD22
About us
Christian Menzinger
Salesforce Architect, Copado
@chris_menzinger
https://www.linkedin.com/in/christianmenzinger
Christian Szandor Knapp
Head of Development, appero
@ch_sz_knapp
https://www.linkedin.com/in/szandor
#CD22
- Chapter I - In a Land far, far away
- Chapter II - Trails for Rangers, Crossroads for Heroes
- Chapter III - The mole’s tale - Summer is coming
- Chapter IV - The dwarf’s tale - We dig, dig, dig, dig, dig, dig, dig
- Running out of time
- Q&A
Your Fairytale Today
#CD22
Chapter
~ I ~
#CD22
In a Land far, far away
#CD22
… there was a charming product owner princess
Once upon a time, in a land far, far away …
#CD22
… and two innocent developers.
(Full Hair)
(Beard)
(Hat)
#CD22
They were working happily together
#CD22
We have a need, she said.
It is going to be beautiful, she
said.
It will be so much fun to build,
she said.
We use base components,
she said.
Until one day …
#CD22
A meeting, two days before …
His dog,
Franz K.,
Architect
Herr Governor Limit
Karl,
4th Gen CEO
Inherited an Empire
(Pricebook)
#CD22
“This is our idea”, princess said
#CD22
“Find products by tabular search”, princess
said
#CD22
Franz, the Architect (sometimes a little too busy)
We always empower Admins.
Have them configure a List View on
Product2.
Use the List View to define the table.
By the way, a Pricebook has 1.500.000
products per currency. Could get a lot
more very quickly.
#CD22
We have a long standing SAP business relationship.
Picklist Values/Keys on Product2 are internal to SAP
Picklist Labels give User Guidance
Use localized Picklist Labels
Make sure fields like Term (12, 24, 36) can be
searched.
Karl, the Boss (Trailhead Ranger, Part Time Admin)
#CD22
“Here are a few pointers for you”, princess said
#CD22
Questions? Any elephants in the room?
For example:
- Are we rebuilding Standard Product Search on Opportunity?
- Is this a good idea?
#CD22
Chapter
~ II ~
#CD22
Trails for Rangers,
Crossroads for Heroes
#CD22
Front End / LEX
(Base Components)
Backend
(Apex)
Front End / LEX
(Wire Adapters)
Project Setup
(e.g. Test Data)
Where to next? Agile or Waterfall?
Backend
(sObjects)
#CD22
Forward Looking
Statement
#CD22
Official cause of death
Governor Limit
RI
P
You died
Invalid Type
Coercion
Platform
Restrictions
Fuzzy (Ideas about)
Requirements
Racing Conditions /
Flags
Performance Issues
currently in Beta
or Deprecated
#CD22
#CD22
Chapter
~ III ~
#CD22
The mole’s tale
Summer is coming
#CD22
Documentation
https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation
Examples and useful Snippets
https://github.com/trailheadapps/lwc-recipes
https://github.com/trailheadapps/apex-recipes
)* in comparison to the start of Aura**
)** Aura today and all Salesforce Docs are in a much more accessible state than most other docs
Excellent state of LWC documentation*
#CD22
He’s a curious and crafty krtek
I’m off building a tiny Proof of Concept
I’m back in an hour
#CD22
He’s a curious and crafty krtek
I will
- Set up a Scratch Org with sample
data using VS Code
- Pump it full of products
- Create LWC
- Use LWC Local Development for
fast prototyping
- Use Wire Adapter to load list view
and records! I used that last year
#CD22
Official cause of death
RI
P
You died
Platform
Restrictions
Racing Conditions /
lags
currently in Beta
or Deprecated
#CD22
Official cause of death
RI
P
You died again
Platform
Restrictions
Racing Conditions /
lags
currently in Beta
or Deprecated
Needs a higher API version than
supported by LWC Local Development
#CD22
First Demo
#CD22
Forward looking statement
RI
P
You died
Performance Issues
#CD22
A Scratch Org comes with <30 Products
Use Open Source tools for data
Snowfakery Config / CumulusCI:
#CD22
Death by Platform Restriction / Limits?
Use Open Source Tools for Data
Snowfakery Config / CumulusCI:
#CD22
SUMMER IS COMING
#CD22
Here’s what we’ve learned
- A lot about client side performance
- Why Summer 22 will make it better
- Why Selections need special care
- Why there are no shortcut/s via Listview
APIs
- Decisions
- No data, no table, no columns, no table
- To talk to Apex we need to know which fields to query
first
- Use getListInfoByName()
- Salesforce Fields are also columns
- Columns need type information
- E.g. Booleans should render as a checkboxes
- Use getObjectInfo()
#CD22
Although we called it
“Tabular Product
Search”
It is not Products we are
looking for but
PricebookEntries
Official cause of death
RI
P
You died
Fuzzy (Ideas about)
Requirements
#CD22
Official cause of death
RI
P
You died again
Platform
Restrictions
PricebookEntries
Do
Not
Support
ListViews
#CD22
Official cause of death
RI
P
You almost died
a 3rd time
Racing Conditions /
Flags
Wire Adapters
are supported only in
@wired decorated
properties/function
No Promise.all()
available
#CD22
Official cause of death
Governor Limit
RI
P
You died
a 3rd time
Performance Issues
currently in Beta
or Deprecated
#CD22
Here’s what we’ve learned
- Loading fewer records is always better
for performance
- Use infinite loading
- Use offsets to avoid query limits for
LDV
- Use a record limit / threshold for
rendered rows in table
- Have we talked about sorting yet?
- String.prototype.localeCompare()
- Or Apex?
#CD22
#CD22
Sorting should work exactly
like in Salesforce
We sort things all of the time
in reports or list views
Of course …
#CD22
“This should be simple”, princess said
#CD22
Here’s what we’ve learned
- Loading fewer records is always better
for performance
- Use infinite loading
- Use offsets to avoid query limits
- Use a record limit / threshold for
rendered rows in table
- Apex does the sorting
- Works good within caching
- Needs a bit of loading otherwise
#CD22
Summary I
- LWC provides
- Offsets
- Limits
- Search Term
- SortedBy Field and Sort Direction
- LWC is responsible for
- Providing Initial Data for Apex Query
- e.g. Field Names
- Talking to Apex
- Debouncing
- Selection Handling
- Data Wrangling
- Data Table does not support
Contact.Account.Name
#CD22
Chapter
~ IV ~
#CD22
The dwarf’s tale
We dig dig dig dig dig dig dig
#CD22
The actual Fairytale (Query based on String Inputs)
(Large Data Volume)
(Strongly Typed)
#CD22
Official cause of death
Invalid Type
Coercion
Fuzzy (Ideas about)
Requirements
RI
P
You died
Platform
Restrictions
#CD22
Should you know the dwarf…
#CD22
Where Clauses and not yet dynamic SOQL
#CD22
Official cause of death
RI
P
You died
Platform
Restrictions
RI
P
You died
#CD22
Finally…
#CD22
Summary II
- Dig, Dig, Dig, Dig, Dig, Dig, Dig
- Not all field types can / will be supported for text search
- (Idea) specialised search fields for e.g. date
- All supported types need to be converted for queries
- Product2.Description is a special snowflake
- (Idea) SOSL for long text fields
- (Challenge) combine User Experience
#CD22
Summary II
- Will we meet Large Data Volume Trouble?
- No due to tight LIMIT clauses
- Rules differ for standard and custom indices
Standard Index
Total # of records is < 1M:
Query must return less than 30% of
total
Total # of records > 1M:
Query must return <300K rows
Custom Index
10% of total records and < 10k rows
#CD22
~ OPEN END ~
#CD22
Architectural Mindset: keep asking questions
Challenge “simple-use-case” documentation
Commit early, commit cleanly, commit often
Handling events as they come out of the box is not always the whole truth
Product2, PricebookEntry do not count against record limit
Inserting 1.5m records is easy, LDV Selective Query Limits are not.
Huge Gains in Summer 22 for Datatable Render Performance
Random Collection of Take-Aways
#CD22
~ RESOURCES / LINKS~
#CD22
“LWC Utils” by tsalb
- Includes a Salesforce-Records-To-Datatable Component
- https://github.com/tsalb/lwc-utils
CumulusCI
- https://trailhead.salesforce.com/en/content/learn/trails/build-applications-with-cumulusci
Apex and LWC Recipes
- https://github.com/trailheadapps/lwc-recipes
- https://github.com/trailheadapps/apex-recipes
Demo Repository for 1.5M Products/PricebookEntries & a simple datatable
- https://github.com/Szandor72/cd22-lightning-datatable
Resources / Links - all Open Source
#CD22
~ Q & A ~
#CD22
appero GmbH is hiring a new
Head of Development
Thank you for 5+ amazing years
Wanna wear my hat?
Thank you! #CD22

Más contenido relacionado

La actualidad más candente

Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers
 

La actualidad más candente (20)

Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
 
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4jNeo4j Graph Platform Overview, Kurt Freytag, Neo4j
Neo4j Graph Platform Overview, Kurt Freytag, Neo4j
 
Janus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) serverJanus: an open source and general purpose WebRTC (gateway) server
Janus: an open source and general purpose WebRTC (gateway) server
 
Machine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud PlatformMachine learning at scale with Google Cloud Platform
Machine learning at scale with Google Cloud Platform
 
Scaling Live OTT with DASH
Scaling Live OTT with DASHScaling Live OTT with DASH
Scaling Live OTT with DASH
 
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes EverythingThe Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
 
End-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John FallowsEnd-to-end Streaming Between gRPC Services Via Kafka with John Fallows
End-to-end Streaming Between gRPC Services Via Kafka with John Fallows
 
Data Streaming with Apache Kafka in the Defence and Cybersecurity Industry
Data Streaming with Apache Kafka in the Defence and Cybersecurity IndustryData Streaming with Apache Kafka in the Defence and Cybersecurity Industry
Data Streaming with Apache Kafka in the Defence and Cybersecurity Industry
 
Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...
Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...
Angular 4 Data Binding | Two Way Data Binding in Angular 4 | Angular 4 Tutori...
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Introduction to MLflow
Introduction to MLflowIntroduction to MLflow
Introduction to MLflow
 
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?Infrastructure-as-Code with Pulumi- Better than all the others (like Ansible)?
Infrastructure-as-Code with Pulumi - Better than all the others (like Ansible)?
 
Kafka and Avro with Confluent Schema Registry
Kafka and Avro with Confluent Schema RegistryKafka and Avro with Confluent Schema Registry
Kafka and Avro with Confluent Schema Registry
 
SQL Extensions to Support Streaming Data With Fabian Hueske | Current 2022
SQL Extensions to Support Streaming Data With Fabian Hueske | Current 2022SQL Extensions to Support Streaming Data With Fabian Hueske | Current 2022
SQL Extensions to Support Streaming Data With Fabian Hueske | Current 2022
 
Introduction to Kafka connect
Introduction to Kafka connectIntroduction to Kafka connect
Introduction to Kafka connect
 
When apache pulsar meets apache flink
When apache pulsar meets apache flinkWhen apache pulsar meets apache flink
When apache pulsar meets apache flink
 
Maxim Fateev - Beyond the Watermark- On-Demand Backfilling in Flink
Maxim Fateev - Beyond the Watermark- On-Demand Backfilling in FlinkMaxim Fateev - Beyond the Watermark- On-Demand Backfilling in Flink
Maxim Fateev - Beyond the Watermark- On-Demand Backfilling in Flink
 
Beyond the DSL-Unlocking the Power of Kafka Streams with the Processor API (A...
Beyond the DSL-Unlocking the Power of Kafka Streams with the Processor API (A...Beyond the DSL-Unlocking the Power of Kafka Streams with the Processor API (A...
Beyond the DSL-Unlocking the Power of Kafka Streams with the Processor API (A...
 
Building an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from RealityBuilding an Enterprise Knowledge Graph @Uber: Lessons from Reality
Building an Enterprise Knowledge Graph @Uber: Lessons from Reality
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 

Similar a LWC Datatable LDV, Christian Knapp & Christian Menzinger

Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
Databricks
 

Similar a LWC Datatable LDV, Christian Knapp & Christian Menzinger (20)

Netflix's Transition to High-Availability Storage (QCon SF 2010)
Netflix's Transition to High-Availability Storage (QCon SF 2010)Netflix's Transition to High-Availability Storage (QCon SF 2010)
Netflix's Transition to High-Availability Storage (QCon SF 2010)
 
OrientDB - the 2nd generation of (MultiModel) NoSQL - Luigi Dell Aquila - Cod...
OrientDB - the 2nd generation of (MultiModel) NoSQL - Luigi Dell Aquila - Cod...OrientDB - the 2nd generation of (MultiModel) NoSQL - Luigi Dell Aquila - Cod...
OrientDB - the 2nd generation of (MultiModel) NoSQL - Luigi Dell Aquila - Cod...
 
Bogdan Kecman Advanced Databasing
Bogdan Kecman Advanced DatabasingBogdan Kecman Advanced Databasing
Bogdan Kecman Advanced Databasing
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL - J On The Beach 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL  - J On The Beach 2016OrientDB - the 2nd generation of (Multi-Model) NoSQL  - J On The Beach 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - J On The Beach 2016
 
Svccg nosql 2011_v4
Svccg nosql 2011_v4Svccg nosql 2011_v4
Svccg nosql 2011_v4
 
Bogdan Kecman INIT Presentation
Bogdan Kecman INIT PresentationBogdan Kecman INIT Presentation
Bogdan Kecman INIT Presentation
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache Spark
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
 
Lessons from the Field, Episode II: Applying Best Practices to Your Apache S...
 Lessons from the Field, Episode II: Applying Best Practices to Your Apache S... Lessons from the Field, Episode II: Applying Best Practices to Your Apache S...
Lessons from the Field, Episode II: Applying Best Practices to Your Apache S...
 
Spark Cassandra 2016
Spark Cassandra 2016Spark Cassandra 2016
Spark Cassandra 2016
 
Introduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at lastIntroduction to Spark Datasets - Functional and relational together at last
Introduction to Spark Datasets - Functional and relational together at last
 
Apache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup TalkApache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup Talk
 
How to build TiDB
How to build TiDBHow to build TiDB
How to build TiDB
 
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016
 
Spark cassandra integration 2016
Spark cassandra integration 2016Spark cassandra integration 2016
Spark cassandra integration 2016
 
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar...
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Tuning and Debugging in Apache Spark
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache Spark
 

Más de CzechDreamin

Más de CzechDreamin (20)

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
 
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ...
 
How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...How we should include Devops Center to get happy developers?, David Fernandez...
How we should include Devops Center to get happy developers?, David Fernandez...
 
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G...
 
Architecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron Crear
 
Ape to API, Filip Dousek
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip Dousek
 
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel MoyaPush Upgrades, The last mile of Salesforce DevOps, Manuel Moya
Push Upgrades, The last mile of Salesforce DevOps, Manuel Moya
 
How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...How do you know you’re solving the right problem? Design Thinking for Salesfo...
How do you know you’re solving the right problem? Design Thinking for Salesfo...
 
ChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark JonesChatGPT … How Does it Flow?, Mark Jones
ChatGPT … How Does it Flow?, Mark Jones
 
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...Real-time communication with Account Engagement (Pardot). Marketers meet deve...
Real-time communication with Account Engagement (Pardot). Marketers meet deve...
 
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian...
 
Sales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy AvilovSales methodology for Salesforce Opportunity, Georgy Avilov
Sales methodology for Salesforce Opportunity, Georgy Avilov
 
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M...
 
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q...
 
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat FragosoNo Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso
 
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew CookWhy do you Need to Migrate to Salesforce Flow?, Andrew Cook
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook
 
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel SombuBe kind to your future admin self, Silvia Denaro & Nathaniel Sombu
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu
 
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk...
 
The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...The minimum-profile approach – the modern way to design an efficient security...
The minimum-profile approach – the modern way to design an efficient security...
 
Restriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise LockieRestriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise Lockie
 

Último

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

LWC Datatable LDV, Christian Knapp & Christian Menzinger

  • 1. Having serious fun with LWC Datatable and Large Data Volume by Christian Szandor Knapp & Christian Menzinger
  • 2. #CD22 About us Christian Menzinger Salesforce Architect, Copado @chris_menzinger https://www.linkedin.com/in/christianmenzinger Christian Szandor Knapp Head of Development, appero @ch_sz_knapp https://www.linkedin.com/in/szandor
  • 3. #CD22 - Chapter I - In a Land far, far away - Chapter II - Trails for Rangers, Crossroads for Heroes - Chapter III - The mole’s tale - Summer is coming - Chapter IV - The dwarf’s tale - We dig, dig, dig, dig, dig, dig, dig - Running out of time - Q&A Your Fairytale Today
  • 5. #CD22 In a Land far, far away
  • 6. #CD22 … there was a charming product owner princess Once upon a time, in a land far, far away …
  • 7. #CD22 … and two innocent developers. (Full Hair) (Beard) (Hat)
  • 8. #CD22 They were working happily together
  • 9. #CD22 We have a need, she said. It is going to be beautiful, she said. It will be so much fun to build, she said. We use base components, she said. Until one day …
  • 10. #CD22 A meeting, two days before … His dog, Franz K., Architect Herr Governor Limit Karl, 4th Gen CEO Inherited an Empire (Pricebook)
  • 11. #CD22 “This is our idea”, princess said
  • 12. #CD22 “Find products by tabular search”, princess said
  • 13. #CD22 Franz, the Architect (sometimes a little too busy) We always empower Admins. Have them configure a List View on Product2. Use the List View to define the table. By the way, a Pricebook has 1.500.000 products per currency. Could get a lot more very quickly.
  • 14. #CD22 We have a long standing SAP business relationship. Picklist Values/Keys on Product2 are internal to SAP Picklist Labels give User Guidance Use localized Picklist Labels Make sure fields like Term (12, 24, 36) can be searched. Karl, the Boss (Trailhead Ranger, Part Time Admin)
  • 15. #CD22 “Here are a few pointers for you”, princess said
  • 16. #CD22 Questions? Any elephants in the room? For example: - Are we rebuilding Standard Product Search on Opportunity? - Is this a good idea?
  • 19. #CD22 Front End / LEX (Base Components) Backend (Apex) Front End / LEX (Wire Adapters) Project Setup (e.g. Test Data) Where to next? Agile or Waterfall? Backend (sObjects)
  • 21. #CD22 Official cause of death Governor Limit RI P You died Invalid Type Coercion Platform Restrictions Fuzzy (Ideas about) Requirements Racing Conditions / Flags Performance Issues currently in Beta or Deprecated
  • 22. #CD22
  • 25. #CD22 Documentation https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/documentation Examples and useful Snippets https://github.com/trailheadapps/lwc-recipes https://github.com/trailheadapps/apex-recipes )* in comparison to the start of Aura** )** Aura today and all Salesforce Docs are in a much more accessible state than most other docs Excellent state of LWC documentation*
  • 26. #CD22 He’s a curious and crafty krtek I’m off building a tiny Proof of Concept I’m back in an hour
  • 27. #CD22 He’s a curious and crafty krtek I will - Set up a Scratch Org with sample data using VS Code - Pump it full of products - Create LWC - Use LWC Local Development for fast prototyping - Use Wire Adapter to load list view and records! I used that last year
  • 28. #CD22 Official cause of death RI P You died Platform Restrictions Racing Conditions / lags currently in Beta or Deprecated
  • 29. #CD22 Official cause of death RI P You died again Platform Restrictions Racing Conditions / lags currently in Beta or Deprecated Needs a higher API version than supported by LWC Local Development
  • 31. #CD22 Forward looking statement RI P You died Performance Issues
  • 32. #CD22 A Scratch Org comes with <30 Products Use Open Source tools for data Snowfakery Config / CumulusCI:
  • 33. #CD22 Death by Platform Restriction / Limits? Use Open Source Tools for Data Snowfakery Config / CumulusCI:
  • 35. #CD22 Here’s what we’ve learned - A lot about client side performance - Why Summer 22 will make it better - Why Selections need special care - Why there are no shortcut/s via Listview APIs - Decisions - No data, no table, no columns, no table - To talk to Apex we need to know which fields to query first - Use getListInfoByName() - Salesforce Fields are also columns - Columns need type information - E.g. Booleans should render as a checkboxes - Use getObjectInfo()
  • 36. #CD22 Although we called it “Tabular Product Search” It is not Products we are looking for but PricebookEntries Official cause of death RI P You died Fuzzy (Ideas about) Requirements
  • 37. #CD22 Official cause of death RI P You died again Platform Restrictions PricebookEntries Do Not Support ListViews
  • 38. #CD22 Official cause of death RI P You almost died a 3rd time Racing Conditions / Flags Wire Adapters are supported only in @wired decorated properties/function No Promise.all() available
  • 39. #CD22 Official cause of death Governor Limit RI P You died a 3rd time Performance Issues currently in Beta or Deprecated
  • 40. #CD22 Here’s what we’ve learned - Loading fewer records is always better for performance - Use infinite loading - Use offsets to avoid query limits for LDV - Use a record limit / threshold for rendered rows in table - Have we talked about sorting yet? - String.prototype.localeCompare() - Or Apex?
  • 41. #CD22
  • 42. #CD22 Sorting should work exactly like in Salesforce We sort things all of the time in reports or list views Of course …
  • 43. #CD22 “This should be simple”, princess said
  • 44. #CD22 Here’s what we’ve learned - Loading fewer records is always better for performance - Use infinite loading - Use offsets to avoid query limits - Use a record limit / threshold for rendered rows in table - Apex does the sorting - Works good within caching - Needs a bit of loading otherwise
  • 45. #CD22 Summary I - LWC provides - Offsets - Limits - Search Term - SortedBy Field and Sort Direction - LWC is responsible for - Providing Initial Data for Apex Query - e.g. Field Names - Talking to Apex - Debouncing - Selection Handling - Data Wrangling - Data Table does not support Contact.Account.Name
  • 47. #CD22 The dwarf’s tale We dig dig dig dig dig dig dig
  • 48. #CD22 The actual Fairytale (Query based on String Inputs) (Large Data Volume) (Strongly Typed)
  • 49. #CD22 Official cause of death Invalid Type Coercion Fuzzy (Ideas about) Requirements RI P You died Platform Restrictions
  • 50. #CD22 Should you know the dwarf…
  • 51. #CD22 Where Clauses and not yet dynamic SOQL
  • 52. #CD22 Official cause of death RI P You died Platform Restrictions RI P You died
  • 54. #CD22 Summary II - Dig, Dig, Dig, Dig, Dig, Dig, Dig - Not all field types can / will be supported for text search - (Idea) specialised search fields for e.g. date - All supported types need to be converted for queries - Product2.Description is a special snowflake - (Idea) SOSL for long text fields - (Challenge) combine User Experience
  • 55. #CD22 Summary II - Will we meet Large Data Volume Trouble? - No due to tight LIMIT clauses - Rules differ for standard and custom indices Standard Index Total # of records is < 1M: Query must return less than 30% of total Total # of records > 1M: Query must return <300K rows Custom Index 10% of total records and < 10k rows
  • 57. #CD22 Architectural Mindset: keep asking questions Challenge “simple-use-case” documentation Commit early, commit cleanly, commit often Handling events as they come out of the box is not always the whole truth Product2, PricebookEntry do not count against record limit Inserting 1.5m records is easy, LDV Selective Query Limits are not. Huge Gains in Summer 22 for Datatable Render Performance Random Collection of Take-Aways
  • 59. #CD22 “LWC Utils” by tsalb - Includes a Salesforce-Records-To-Datatable Component - https://github.com/tsalb/lwc-utils CumulusCI - https://trailhead.salesforce.com/en/content/learn/trails/build-applications-with-cumulusci Apex and LWC Recipes - https://github.com/trailheadapps/lwc-recipes - https://github.com/trailheadapps/apex-recipes Demo Repository for 1.5M Products/PricebookEntries & a simple datatable - https://github.com/Szandor72/cd22-lightning-datatable Resources / Links - all Open Source
  • 60. #CD22 ~ Q & A ~
  • 61. #CD22 appero GmbH is hiring a new Head of Development Thank you for 5+ amazing years Wanna wear my hat?

Notas del editor

  1. “What did we miss in the meantime?” “ A meeting, two days before between Franz and Karl …. “
  2. Why not Pricebook Entry List View? Because not available / supported . admins cannot configure listviews on PBE
  3. Answer: Partly, yes. Opp Product Search works only in one place, though. We build a level more generic - the same search can be used for opp products as well as order products for example. Assets could work similarly.
  4. See, if our heroes had only known what expected them. But they didn’t. Ignorance is a bliss sometimes.
  5. Hop into documentation
  6. Scratch Org timeouts didn’t help, either…
  7. Krtek made his demo much simpler;
  8. Now, how can that happen in the very first PoC?
  9. NO death by governor limit?
  10. NO death by governor limit? Nope; not even data limits :)
  11. It is still Spring, virtual rendering is only available in Sandboxes / Preview Orgs Even if we could why would we want to load 5000+ records? Given we have a 1.5 M Products (and pricebook entries), we could hit the 50.000 query row limit
  12. Why / where should we sort / how?
  13. String.prototype.localeCompare() - JavaScript | MDN (mozilla.org)
  14. Why / where should we sort / how?
  15. SOQL / SOSL ?
  16. Over 20 DisplayTypes DisplayType Enum | Apex Reference Guide | Salesforce Developers
  17. This is a best case scenario Is this secure?
  18. Long text not searchable
  19. Explain switch statement
  20. The most records that could ever be returned for the query to be considered selective is 1M but the total data set size would need to be > 5.6M records Steve Baines
  21. The most records that could ever be returned for the query to be considered selective is 1M but the total data set size would need to be > 5.6M records Steve Baines
  22. I have a question: why was there never any mention of large data volume again?
  23. I have a question: why was there never any mention of large data volume again?