SlideShare a Scribd company logo
1 of 30
Download to read offline
Welcome
September 11, 2013
World Headquarters
Cincinnati, Ohio
®
Pursuing Performance
in Store
Algorithms, Queries and Schemas
By Tom Robinson
What is Store ?
• Store is a Version Control System for Cincom Smalltalk™
• Uses a Relational Database as the repository
• Versions
 Bundles and Packages (components)
 Namespaces
 Class Definitions
 Class Extensions (methods only)
 Shared Variables
 Methods
Store Capabilities
• Provides Tools for:
 Publishing Bundles/Packages
 Merging Bundle/Package versions into the image
 Loading all version-able entities
 Listing, Browsing, Comparing all version-able entities
 Administration
• Supports object queries using Glorp
Isn’t A Relational SCCS Crazy?
• It might be….for languages that save source code in
text files. Would you like to compare whole files or
class and method versions?
• Relational is actually a good fit
• 25 tables + their indexes – this is not like mortgages,
insurance policies or shipping containers
• Most enterprises
• already use an RDB
• already employ DBAs
• already have other database management tools
Store Structure
Why Isn’t Store Fast Already?
It Is….
• Cincom engineers don’t find Store to be an
impediment to their work
• Most customers find Store “fast enough”
…but…
Store Needs To Be (And Can Be) Faster
• Everyone likes faster
• Original schema issues need fixing
• Move to Glorp (to allow addressing schema issues)
focused on correctness
• Customers use Store differently than Cincom does
• Large codebases, much larger packages and bundles
• Extensive use of Store to version files
• Cincom needs larger codebases to benchmark against
Algorithms, Queries and Schemas
• Algorithms – making Store run faster in the image
• More intelligent use of sessions and caching
• Minimizing the effects of larger codebases
• Queries – making smarter database requests
• Asking for the right amount of data
• At the right time
• Schema
• Needs to match the data and usage patterns
• Shouldn’t impose unintentional constraints on usage
ALGORITHMS
Making Store Run Faster in the Image
Improving #reconcileMethods
StorePackage>>#reconcileMethods
(self methods isEmpty and: [self previous methods isEmpty])
ifTrue: [^self].
methods size = self previous methods size
ifFalse: [self markModified].
methods do: [:each |
each definition: ( self reconcileMethod: each definition)].
Inside #reconcileMethods
#reconcileMethods
#reconcileMethod: aStoreMethod
#basicReconcileMethod: aStoreMethod
| exactMatch |
self previous isNil ifTrue: [^nil].
exactMatch := self previous methods
detect: [:each | aStoreMethod reconcilesWith: each definition]
ifNone: [nil].
^exactMatch notNil
ifTrue: [exactMatch definition]
ifFalse: [nil].
Time To Prepare To Write Rows
Package Methods Total Time
(sec)
Percent
reconcile
Methods
Time for
reconcile
Methods
Internationalization 4,208 6.4 59.3 3.8
Jun 33,794 168.7 66.5 111.7
PerfTestPkg1 50,000 780.9 77.6 605.3
PerfTestPkg2 100,000 3811.2 81.4 3102.1
Changes In Time To Prepare To Write Rows
Revised #reconcileMethods (VW7.10.1)
• Iterates once over the collection of methods from the previous
version, building a dictionary with selector and className as the
key and the method as the value.
• Iterates once over the collection of methods in the current
version, does a dictionary lookup to find the previous version if it
exists and does a single comparison.
• Even with 100,000 methods and 500 classes, this change
doesn’t save time when comparing class definitions,
namespaces or shared variables.
QUERIES
Making Smarter Database Requests
Query 1: Method Versions
• Old version retrieved one StoreMethodInPackage per
package version (and frequently many per method
version) and discarded duplicates
• New version retrieves the StoreMethodInPackage with
the earliest timestamp for each method version, so no
duplicates
Old Method Versions Query
allVersionsWithName: aString inClass: aClassName in: aSession
| query session objects |
session := aSession ifNil: [StoreLoginFactory currentStoreSession].
query := Query
read: self
where: [:eachMethod | eachMethod definition name = aString
AND: [eachMethod definition className = aClassName]].
query alsoFetch: #definition.
…(additional alsoFetch: statements removed)…
query alsoFetch: [:each | each package].
query orderBy: [:each | each definition timestamp descending].
query orderBy: [:each | each package timestamp].
objects := session execute: query.
^self removeDuplicatesFrom: objects
New Method Versions Query (VW7.10)
allVersionsWithName: aString inClass: aClassName in: aSession
| query session |
session := aSession ifNil: [StoreLoginFactory currentStoreSession].
query := Query read: self
where: [:eachLink | (eachLink definition name = aString)
AND: [(eachLink definition className = aClassName)
AND: [eachLink package timestamp = (
(Query readOneOf: self
where: [:eachLink2 |
eachLink2 definition id = eachLink definition id])
retrieve: [:eachLink2 | eachLink2 package timestamp min];
yourself)]]].
query alsoFetch: #definition.
query alsoFetch: [:each | each definition source].
query alsoFetch: [:each | each package].
query orderBy: [:each | each definition timestamp descending].
query orderBy: [:each | each package timestamp].
^(session execute: query) asOrderedCollection
Query 2: Improving Package Comparison (VW 7.9)
• Original method:
• Load version A
• Load version B
• Match up equivalent objects
• Compare and show differences
• New method
• Load different database records only
• Match up equivalent objects
• Compare and show differences
In-Memory Method Comparison
Version A
33,000 Methods Loaded
Version B
33,003 Methods Loaded
66K methods compared in image
Differential Retrieval
Unchanged
32,987 methods
(not retrieved)
New Records not in Previous
 5 added methods
 11 changed methods
Old Records not in Next
 2 deleted methods
 11 changed methods
13 methods retrieved
16 methods retrieved
29 methods compared in image
Differential Retrieval Code
allMethodDifferencesWith: anotherStorePackage
| keys query1 query2 union |
keys := Array with: self primaryKey with: anotherStorePackage primaryKey.
query1 := Query read: StoreMethodInPackage
where: [:each | |subQuery |
subQuery := Query read: StoreMethodInPackage where: [:foo |
foo packageRef = keys last].
subQuery retrieve: [:x | x methodRef].
(each packageRef = keys first)
& ((each methodRef) notIn: subQuery)].
query1 alsoFetch: [:each| each definition].
query1 alsoFetch: [:each| each definition source].
query1 alsoFetch: [:each| each package].
query2 := Query read: StoreMethodInPackage...
…
union := query1 unionAll: query2.
union requiresDistinct: false.
^session execute: union.
SCHEMA
Possible Schema Changes
• Bundle/Package version globally unique identifiers
• Modifying method source storage
• Currently using chained blobs
• Modify to use a character format, possibly with special
provision for very large methods
• Modifying file storage
• Also use chained blobs
• Modify to use blocked blobs on Oracle
• These are ideas which may not survive testing
Method Source Storage (Currently 32k)
Percentile Method size
90.0 569
99.0 1957
99.5 3067
99.9 6835
Needed To Support Schema Changes
• Changes have to work across databases
• Taking advantage of database specific features
• Dealing with database shortcomings
• Occaisionally may require Glorp enhancements
• Solutions for customers
• With multiple Cincom® ObjectStudio® or
Cincom® VisualWorks® versions
• With large existing repositories
Questions? Comments?
Ask now
--- or ---
Tom Robinson
trobinson1@cincom.com
Contact Information
Star Team (Smalltalk Strategic Resources)
– Suzanne Fortman (sfortman@cincom.com)
Cincom Smalltalk Program Director
– Arden Thomas (athomas@cincom.com)
Cincom Smalltalk Product Manager
– Jeremy Jordan (jjordan@cincom.com)
Cincom Smalltalk Marketing Manager
http://www.cincomsmalltalk.com
 2013 Cincom Systems, Inc.
All Rights Reserved
Developed in the U.S.A.
CINCOM, the Quadrant Logo, and Simplification Through Innovation are registered trademarks of Cincom Systems, Inc.
All other trademarks belong to their respective companies.

More Related Content

Similar to Pursuing Performance in Store

Store Beyond Glorp
Store Beyond GlorpStore Beyond Glorp
Store Beyond GlorpESUG
 
Developer testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticDeveloper testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticLB Denker
 
Frivol Ruby on Beer talk, Sept 2010
Frivol Ruby on Beer talk, Sept 2010Frivol Ruby on Beer talk, Sept 2010
Frivol Ruby on Beer talk, Sept 2010marcheiligers
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Teamstudio
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cachesqlserver.co.il
 
Calypso Browser
Calypso BrowserCalypso Browser
Calypso BrowserPharo
 
33rd degree talk: open and automatic coding conventions with walkmod
33rd degree talk: open and automatic coding conventions with walkmod33rd degree talk: open and automatic coding conventions with walkmod
33rd degree talk: open and automatic coding conventions with walkmodwalkmod
 
Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1Yi-Huan Chan
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingGrant Fritchey
 
The programming philosophy of jrql
The programming philosophy of jrqlThe programming philosophy of jrql
The programming philosophy of jrqlmsg systems ag
 
Performance Tuning and Optimization
Performance Tuning and OptimizationPerformance Tuning and Optimization
Performance Tuning and OptimizationMongoDB
 
Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhoodESUG
 
Developer testing 201: When to Mock and When to Integrate
Developer testing 201: When to Mock and When to IntegrateDeveloper testing 201: When to Mock and When to Integrate
Developer testing 201: When to Mock and When to IntegrateLB Denker
 
How to crack java script certification
How to crack java script certificationHow to crack java script certification
How to crack java script certificationKadharBashaJ
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APCBen Ramsey
 

Similar to Pursuing Performance in Store (20)

Store Beyond Glorp
Store Beyond GlorpStore Beyond Glorp
Store Beyond Glorp
 
Developer testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticDeveloper testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing Fanatic
 
Frivol Ruby on Beer talk, Sept 2010
Frivol Ruby on Beer talk, Sept 2010Frivol Ruby on Beer talk, Sept 2010
Frivol Ruby on Beer talk, Sept 2010
 
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
Take a Trip Into the Forest: A Java Primer on Maps, Trees, and Collections
 
Things you can find in the plan cache
Things you can find in the plan cacheThings you can find in the plan cache
Things you can find in the plan cache
 
Calypso browser
Calypso browserCalypso browser
Calypso browser
 
Calypso Browser
Calypso BrowserCalypso Browser
Calypso Browser
 
33rd degree talk: open and automatic coding conventions with walkmod
33rd degree talk: open and automatic coding conventions with walkmod33rd degree talk: open and automatic coding conventions with walkmod
33rd degree talk: open and automatic coding conventions with walkmod
 
Into The Box 2018 - CBT
Into The Box 2018 - CBTInto The Box 2018 - CBT
Into The Box 2018 - CBT
 
Test in action – week 1
Test in action – week 1Test in action – week 1
Test in action – week 1
 
PostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and AlertingPostgreSQL Performance Problems: Monitoring and Alerting
PostgreSQL Performance Problems: Monitoring and Alerting
 
The programming philosophy of jrql
The programming philosophy of jrqlThe programming philosophy of jrql
The programming philosophy of jrql
 
Performance Tuning and Optimization
Performance Tuning and OptimizationPerformance Tuning and Optimization
Performance Tuning and Optimization
 
Calypso underhood
 Calypso underhood Calypso underhood
Calypso underhood
 
Developer testing 201: When to Mock and When to Integrate
Developer testing 201: When to Mock and When to IntegrateDeveloper testing 201: When to Mock and When to Integrate
Developer testing 201: When to Mock and When to Integrate
 
Django Pro ORM
Django Pro ORMDjango Pro ORM
Django Pro ORM
 
Performance Tuning
Performance TuningPerformance Tuning
Performance Tuning
 
High Performance Solr
High Performance SolrHigh Performance Solr
High Performance Solr
 
How to crack java script certification
How to crack java script certificationHow to crack java script certification
How to crack java script certification
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APC
 

More from ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

More from ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Recently uploaded

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Pursuing Performance in Store

  • 1. Welcome September 11, 2013 World Headquarters Cincinnati, Ohio ® Pursuing Performance in Store Algorithms, Queries and Schemas By Tom Robinson
  • 2. What is Store ? • Store is a Version Control System for Cincom Smalltalk™ • Uses a Relational Database as the repository • Versions  Bundles and Packages (components)  Namespaces  Class Definitions  Class Extensions (methods only)  Shared Variables  Methods
  • 3. Store Capabilities • Provides Tools for:  Publishing Bundles/Packages  Merging Bundle/Package versions into the image  Loading all version-able entities  Listing, Browsing, Comparing all version-able entities  Administration • Supports object queries using Glorp
  • 4. Isn’t A Relational SCCS Crazy? • It might be….for languages that save source code in text files. Would you like to compare whole files or class and method versions? • Relational is actually a good fit • 25 tables + their indexes – this is not like mortgages, insurance policies or shipping containers • Most enterprises • already use an RDB • already employ DBAs • already have other database management tools
  • 6. Why Isn’t Store Fast Already?
  • 7. It Is…. • Cincom engineers don’t find Store to be an impediment to their work • Most customers find Store “fast enough” …but…
  • 8. Store Needs To Be (And Can Be) Faster • Everyone likes faster • Original schema issues need fixing • Move to Glorp (to allow addressing schema issues) focused on correctness • Customers use Store differently than Cincom does • Large codebases, much larger packages and bundles • Extensive use of Store to version files • Cincom needs larger codebases to benchmark against
  • 9. Algorithms, Queries and Schemas • Algorithms – making Store run faster in the image • More intelligent use of sessions and caching • Minimizing the effects of larger codebases • Queries – making smarter database requests • Asking for the right amount of data • At the right time • Schema • Needs to match the data and usage patterns • Shouldn’t impose unintentional constraints on usage
  • 10. ALGORITHMS Making Store Run Faster in the Image
  • 11. Improving #reconcileMethods StorePackage>>#reconcileMethods (self methods isEmpty and: [self previous methods isEmpty]) ifTrue: [^self]. methods size = self previous methods size ifFalse: [self markModified]. methods do: [:each | each definition: ( self reconcileMethod: each definition)].
  • 12. Inside #reconcileMethods #reconcileMethods #reconcileMethod: aStoreMethod #basicReconcileMethod: aStoreMethod | exactMatch | self previous isNil ifTrue: [^nil]. exactMatch := self previous methods detect: [:each | aStoreMethod reconcilesWith: each definition] ifNone: [nil]. ^exactMatch notNil ifTrue: [exactMatch definition] ifFalse: [nil].
  • 13. Time To Prepare To Write Rows Package Methods Total Time (sec) Percent reconcile Methods Time for reconcile Methods Internationalization 4,208 6.4 59.3 3.8 Jun 33,794 168.7 66.5 111.7 PerfTestPkg1 50,000 780.9 77.6 605.3 PerfTestPkg2 100,000 3811.2 81.4 3102.1
  • 14. Changes In Time To Prepare To Write Rows
  • 15. Revised #reconcileMethods (VW7.10.1) • Iterates once over the collection of methods from the previous version, building a dictionary with selector and className as the key and the method as the value. • Iterates once over the collection of methods in the current version, does a dictionary lookup to find the previous version if it exists and does a single comparison. • Even with 100,000 methods and 500 classes, this change doesn’t save time when comparing class definitions, namespaces or shared variables.
  • 17. Query 1: Method Versions • Old version retrieved one StoreMethodInPackage per package version (and frequently many per method version) and discarded duplicates • New version retrieves the StoreMethodInPackage with the earliest timestamp for each method version, so no duplicates
  • 18. Old Method Versions Query allVersionsWithName: aString inClass: aClassName in: aSession | query session objects | session := aSession ifNil: [StoreLoginFactory currentStoreSession]. query := Query read: self where: [:eachMethod | eachMethod definition name = aString AND: [eachMethod definition className = aClassName]]. query alsoFetch: #definition. …(additional alsoFetch: statements removed)… query alsoFetch: [:each | each package]. query orderBy: [:each | each definition timestamp descending]. query orderBy: [:each | each package timestamp]. objects := session execute: query. ^self removeDuplicatesFrom: objects
  • 19. New Method Versions Query (VW7.10) allVersionsWithName: aString inClass: aClassName in: aSession | query session | session := aSession ifNil: [StoreLoginFactory currentStoreSession]. query := Query read: self where: [:eachLink | (eachLink definition name = aString) AND: [(eachLink definition className = aClassName) AND: [eachLink package timestamp = ( (Query readOneOf: self where: [:eachLink2 | eachLink2 definition id = eachLink definition id]) retrieve: [:eachLink2 | eachLink2 package timestamp min]; yourself)]]]. query alsoFetch: #definition. query alsoFetch: [:each | each definition source]. query alsoFetch: [:each | each package]. query orderBy: [:each | each definition timestamp descending]. query orderBy: [:each | each package timestamp]. ^(session execute: query) asOrderedCollection
  • 20. Query 2: Improving Package Comparison (VW 7.9) • Original method: • Load version A • Load version B • Match up equivalent objects • Compare and show differences • New method • Load different database records only • Match up equivalent objects • Compare and show differences
  • 21. In-Memory Method Comparison Version A 33,000 Methods Loaded Version B 33,003 Methods Loaded 66K methods compared in image
  • 22. Differential Retrieval Unchanged 32,987 methods (not retrieved) New Records not in Previous  5 added methods  11 changed methods Old Records not in Next  2 deleted methods  11 changed methods 13 methods retrieved 16 methods retrieved 29 methods compared in image
  • 23. Differential Retrieval Code allMethodDifferencesWith: anotherStorePackage | keys query1 query2 union | keys := Array with: self primaryKey with: anotherStorePackage primaryKey. query1 := Query read: StoreMethodInPackage where: [:each | |subQuery | subQuery := Query read: StoreMethodInPackage where: [:foo | foo packageRef = keys last]. subQuery retrieve: [:x | x methodRef]. (each packageRef = keys first) & ((each methodRef) notIn: subQuery)]. query1 alsoFetch: [:each| each definition]. query1 alsoFetch: [:each| each definition source]. query1 alsoFetch: [:each| each package]. query2 := Query read: StoreMethodInPackage... … union := query1 unionAll: query2. union requiresDistinct: false. ^session execute: union.
  • 25. Possible Schema Changes • Bundle/Package version globally unique identifiers • Modifying method source storage • Currently using chained blobs • Modify to use a character format, possibly with special provision for very large methods • Modifying file storage • Also use chained blobs • Modify to use blocked blobs on Oracle • These are ideas which may not survive testing
  • 26. Method Source Storage (Currently 32k) Percentile Method size 90.0 569 99.0 1957 99.5 3067 99.9 6835
  • 27. Needed To Support Schema Changes • Changes have to work across databases • Taking advantage of database specific features • Dealing with database shortcomings • Occaisionally may require Glorp enhancements • Solutions for customers • With multiple Cincom® ObjectStudio® or Cincom® VisualWorks® versions • With large existing repositories
  • 28. Questions? Comments? Ask now --- or --- Tom Robinson trobinson1@cincom.com
  • 29. Contact Information Star Team (Smalltalk Strategic Resources) – Suzanne Fortman (sfortman@cincom.com) Cincom Smalltalk Program Director – Arden Thomas (athomas@cincom.com) Cincom Smalltalk Product Manager – Jeremy Jordan (jjordan@cincom.com) Cincom Smalltalk Marketing Manager http://www.cincomsmalltalk.com
  • 30.  2013 Cincom Systems, Inc. All Rights Reserved Developed in the U.S.A. CINCOM, the Quadrant Logo, and Simplification Through Innovation are registered trademarks of Cincom Systems, Inc. All other trademarks belong to their respective companies.