LWC Datatable LDV, Christian Knapp & Christian Menzinger

CzechDreamin
CzechDreaminCzechDreamin
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
1 of 62

Recommended

Netflix's Transition to High-Availability Storage (QCon SF 2010) by
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)Sid Anand
2.5K views46 slides
OrientDB - the 2nd generation of (MultiModel) NoSQL - Luigi Dell Aquila - Cod... by
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...Codemotion
443 views53 slides
Bogdan Kecman Advanced Databasing by
Bogdan Kecman Advanced DatabasingBogdan Kecman Advanced Databasing
Bogdan Kecman Advanced DatabasingBogdan Kecman
133 views32 slides
OrientDB - the 2nd generation of (Multi-Model) NoSQL - J On The Beach 2016 by
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 2016Luigi Dell'Aquila
914 views55 slides
Svccg nosql 2011_v4 by
Svccg nosql 2011_v4Svccg nosql 2011_v4
Svccg nosql 2011_v4Sid Anand
5.4K views65 slides
Bogdan Kecman INIT Presentation by
Bogdan Kecman INIT PresentationBogdan Kecman INIT Presentation
Bogdan Kecman INIT Presentationarhismece
9 views31 slides

More Related Content

Similar to LWC Datatable LDV, Christian Knapp & Christian Menzinger

Lessons from the Field, Episode II: Applying Best Practices to Your Apache S... by
 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...Databricks
868 views28 slides
Spark Cassandra 2016 by
Spark Cassandra 2016Spark Cassandra 2016
Spark Cassandra 2016Duyhai Doan
737 views36 slides
Introduction to Spark Datasets - Functional and relational together at last by
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 lastHolden Karau
640 views49 slides
Apache Spark Best Practices Meetup Talk by
Apache Spark Best Practices Meetup TalkApache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup TalkEren Avşaroğulları
156 views21 slides
How to build TiDB by
How to build TiDBHow to build TiDB
How to build TiDBPingCAP
762 views51 slides
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016 by
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 2016Luigi Dell'Aquila
543 views51 slides

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

Lessons from the Field, Episode II: Applying Best Practices to Your Apache S... by Databricks
 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...
Databricks868 views
Spark Cassandra 2016 by Duyhai Doan
Spark Cassandra 2016Spark Cassandra 2016
Spark Cassandra 2016
Duyhai Doan737 views
Introduction to Spark Datasets - Functional and relational together at last by Holden Karau
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
Holden Karau640 views
How to build TiDB by PingCAP
How to build TiDBHow to build TiDB
How to build TiDB
PingCAP762 views
OrientDB - the 2nd generation of (Multi-Model) NoSQL - Codemotion Warsaw 2016 by Luigi Dell'Aquila
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
Luigi Dell'Aquila543 views
Spark cassandra integration 2016 by Duyhai Doan
Spark cassandra integration 2016Spark cassandra integration 2016
Spark cassandra integration 2016
Duyhai Doan522 views
Road to Enterprise Architecture for Big Data Applications: Mixing Apache Spar... by Databricks
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...
Databricks863 views
Tuning and Debugging in Apache Spark by Patrick Wendell
Tuning and Debugging in Apache SparkTuning and Debugging in Apache Spark
Tuning and Debugging in Apache Spark
Patrick Wendell36K views
Big data beyond the JVM - DDTX 2018 by Holden Karau
Big data beyond the JVM -  DDTX 2018Big data beyond the JVM -  DDTX 2018
Big data beyond the JVM - DDTX 2018
Holden Karau155 views
Cassandra Deep Diver & Data Modeling by Brian Enochson
Cassandra Deep Diver & Data ModelingCassandra Deep Diver & Data Modeling
Cassandra Deep Diver & Data Modeling
Brian Enochson2.6K views
DRUG - RDSTK Talk by rtelmore
DRUG - RDSTK TalkDRUG - RDSTK Talk
DRUG - RDSTK Talk
rtelmore3.4K views
Big Data-Driven Applications with Cassandra and Spark by Artem Chebotko
Big Data-Driven Applications  with Cassandra and SparkBig Data-Driven Applications  with Cassandra and Spark
Big Data-Driven Applications with Cassandra and Spark
Artem Chebotko852 views
Scylla Summit 2017: Scylla for Mass Simultaneous Sensor Data Processing of ME... by ScyllaDB
Scylla Summit 2017: Scylla for Mass Simultaneous Sensor Data Processing of ME...Scylla Summit 2017: Scylla for Mass Simultaneous Sensor Data Processing of ME...
Scylla Summit 2017: Scylla for Mass Simultaneous Sensor Data Processing of ME...
ScyllaDB1.1K views
Architecting a next-generation data platform by hadooparchbook
Architecting a next-generation data platformArchitecting a next-generation data platform
Architecting a next-generation data platform
hadooparchbook1.9K views

More from CzechDreamin

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi... by
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...CzechDreamin
1.1K views32 slides
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ... by
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 ...CzechDreamin
1K views27 slides
How we should include Devops Center to get happy developers?, David Fernandez... by
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...CzechDreamin
1K views20 slides
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G... by
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...CzechDreamin
1K views18 slides
Architecting for Analytics, Aaron Crear by
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron CrearCzechDreamin
1.1K views16 slides
Ape to API, Filip Dousek by
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip DousekCzechDreamin
1.1K views32 slides

More from CzechDreamin(20)

Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi... by CzechDreamin
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
Salesforce Forecasting: Evolution, Implementation and Best Practices, Christi...
CzechDreamin1.1K views
Supercharge Salesforce Marketing Cloud: The Ultimate Apps Guide, Cyril Louis ... by CzechDreamin
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 ...
CzechDreamin1K views
How we should include Devops Center to get happy developers?, David Fernandez... by CzechDreamin
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...
CzechDreamin1K views
Streamline Your Integration with Salesforce’s Composite API: A Consultant’s G... by CzechDreamin
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...
CzechDreamin1K views
Architecting for Analytics, Aaron Crear by CzechDreamin
Architecting for Analytics, Aaron CrearArchitecting for Analytics, Aaron Crear
Architecting for Analytics, Aaron Crear
CzechDreamin1.1K views
Ape to API, Filip Dousek by CzechDreamin
Ape to API, Filip DousekApe to API, Filip Dousek
Ape to API, Filip Dousek
CzechDreamin1.1K views
How do you know you’re solving the right problem? Design Thinking for Salesfo... by CzechDreamin
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...
CzechDreamin1.1K views
Real-time communication with Account Engagement (Pardot). Marketers meet deve... by CzechDreamin
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...
CzechDreamin1.1K views
Black Hat Session: Exploring and Exploiting Aura based Experiences, Christian... by CzechDreamin
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...
CzechDreamin1.2K views
5 key ideas for robust and flexible REST API integrations with Apex, Lucian M... by CzechDreamin
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...
CzechDreamin1.1K views
Report & Dashboard REST API : Get your report accessible anywhere !, Romain Q... by CzechDreamin
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...
CzechDreamin1.1K views
No Such Thing as Best Practice in Design, Nati Asher and Pat Fragoso by CzechDreamin
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
CzechDreamin1.2K views
Why do you Need to Migrate to Salesforce Flow?, Andrew Cook by CzechDreamin
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
CzechDreamin1.1K views
Be kind to your future admin self, Silvia Denaro & Nathaniel Sombu by CzechDreamin
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
CzechDreamin1.1K views
Monitoring Automation Performance in Marketing Cloud Engagement, Daniela Vrbk... by CzechDreamin
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...
CzechDreamin1.2K views
The minimum-profile approach – the modern way to design an efficient security... by CzechDreamin
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...
CzechDreamin1.2K views
Restriction Rules – The Whole Picture, Louise Lockie by CzechDreamin
Restriction Rules – The Whole Picture, Louise LockieRestriction Rules – The Whole Picture, Louise Lockie
Restriction Rules – The Whole Picture, Louise Lockie
CzechDreamin1.5K views
Introduction to Custom Journey Builder Activities, Orkhan Alakbarli by CzechDreamin
Introduction to Custom Journey Builder Activities, Orkhan AlakbarliIntroduction to Custom Journey Builder Activities, Orkhan Alakbarli
Introduction to Custom Journey Builder Activities, Orkhan Alakbarli
CzechDreamin1.2K views
Taking control of your queries with GraphQL, Alba Rivas by CzechDreamin
Taking control of your queries with GraphQL, Alba RivasTaking control of your queries with GraphQL, Alba Rivas
Taking control of your queries with GraphQL, Alba Rivas
CzechDreamin1.2K views
“Soft Skills” are the new “Hard Skills” – Tips & Tricks for Salesforce Projec... by CzechDreamin
“Soft Skills” are the new “Hard Skills” – Tips & Tricks for Salesforce Projec...“Soft Skills” are the new “Hard Skills” – Tips & Tricks for Salesforce Projec...
“Soft Skills” are the new “Hard Skills” – Tips & Tricks for Salesforce Projec...
CzechDreamin1.1K views

Recently uploaded

JioEngage_Presentation.pptx by
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptxadmin125455
8 views4 slides
Top-5-production-devconMunich-2023.pptx by
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptxTier1 app
9 views40 slides
What is API by
What is APIWhat is API
What is APIartembondar5
12 views15 slides
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
15 views19 slides
Keep by
KeepKeep
KeepGeniusee
78 views10 slides
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionMárton Kodok
16 views55 slides

Recently uploaded(20)

JioEngage_Presentation.pptx by admin125455
JioEngage_Presentation.pptxJioEngage_Presentation.pptx
JioEngage_Presentation.pptx
admin1254558 views
Top-5-production-devconMunich-2023.pptx by Tier1 app
Top-5-production-devconMunich-2023.pptxTop-5-production-devconMunich-2023.pptx
Top-5-production-devconMunich-2023.pptx
Tier1 app9 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm15 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok16 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptxBootstrapping vs Venture Capital.pptx
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic15 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke35 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski13 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin96 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ11 views
predicting-m3-devopsconMunich-2023-v2.pptx by Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app11 views
FOSSLight Community Day 2023-11-30 by Shane Coughlan
FOSSLight Community Day 2023-11-30FOSSLight Community Day 2023-11-30
FOSSLight Community Day 2023-11-30
Shane Coughlan6 views
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik8 views
FIMA 2023 Neo4j & FS - Entity Resolution.pptx by Neo4j
FIMA 2023 Neo4j & FS - Entity Resolution.pptxFIMA 2023 Neo4j & FS - Entity Resolution.pptx
FIMA 2023 Neo4j & FS - Entity Resolution.pptx
Neo4j17 views

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?

Editor's Notes

  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?