SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
Blockchain Interview Questions And Answers | Blockchain Technology Interview ...Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
Simplilearn
 
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
SSIMeetup
 

Was ist angesagt? (15)

CQRS and event sourcing
CQRS and event sourcingCQRS and event sourcing
CQRS and event sourcing
 
Monitoring MongoDB Atlas with Datadog
Monitoring MongoDB Atlas with DatadogMonitoring MongoDB Atlas with Datadog
Monitoring MongoDB Atlas with Datadog
 
Hyperledger fabric architecture
Hyperledger fabric architectureHyperledger fabric architecture
Hyperledger fabric architecture
 
Updated: Should you be using an Event Driven Architecture
Updated: Should you be using an Event Driven ArchitectureUpdated: Should you be using an Event Driven Architecture
Updated: Should you be using an Event Driven Architecture
 
옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...
옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...
옵저버빌러티(Observability) 확보로 서버리스 마이크로서비스 들여다보기 - 김형일 AWS 솔루션즈 아키텍트 :: AWS Summi...
 
Introduction to Self-Sovereign Identity
Introduction to Self-Sovereign IdentityIntroduction to Self-Sovereign Identity
Introduction to Self-Sovereign Identity
 
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in ProductionKong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
 
Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618Hyperledger Fabric Technical Deep Dive 20190618
Hyperledger Fabric Technical Deep Dive 20190618
 
Introduction to CQRS (Command Query Responsibility Segregation)
Introduction to CQRS (Command Query Responsibility Segregation)Introduction to CQRS (Command Query Responsibility Segregation)
Introduction to CQRS (Command Query Responsibility Segregation)
 
One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)
One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)
One More State Management in Angular (NGRX vs. NGXS vs. Akita vs. RXJS)
 
Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
Blockchain Interview Questions And Answers | Blockchain Technology Interview ...Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
Blockchain Interview Questions And Answers | Blockchain Technology Interview ...
 
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
Peer DIDs: a secure and scalable method for DIDs that’s entirely off-ledger –...
 
Introducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring Statemachine
 
Blockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - ClaventBlockchain HyperLedger Fabric Internals - Clavent
Blockchain HyperLedger Fabric Internals - Clavent
 
Neo4j: What's Under the Hood
Neo4j: What's Under the HoodNeo4j: What's Under the Hood
Neo4j: What's Under the Hood
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von CzechDreamin

Mehr von 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
 

Kürzlich hochgeladen

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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

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
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
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...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 

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?

Hinweis der Redaktion

  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?