SlideShare a Scribd company logo
1 of 8
Improving the Performance of a Grails
Application
About Neev
Web

Mobile

Magento eCommerce
SaaS Applications
Video Streaming Portals
Rich Internet Apps
Custom Development

iPhone
Android
Windows Phone 7
HTML5 Apps

Cloud
AWS Consulting Partner
Rackspace
Joyent
Heroku
Google App Engine

Key Company Highlights
250+ team with experience in
managing
offshore, distributed
development.
Neev Technologies
established in Jan ’05
VC Funding in 2009 By Basil
Partners

User Interface Design and User Experience Design

Part of Publicis Groupe
Member of NASSCOM.

Performance Consulting Practices
Development Centers in
Bangalore and Pune.
Quality Assurance & Testing

Outsourced Product Development

Offices at
Bangalore, USA, Delhi, Pune,
Singapore and Stockholm.
The Scenario used for Testing Grails Application Performance
• Medium EC2 with RDS having no IOPS
• Grails 2.1.1 environment with a number of plugins

• Huge DB with transactions trying to insert as many as 100k records
• New setup was limited in terms of CPU and memory resources and therefore
reveal more glaring mistakes in code with regard to performance
considerations
What helps to Improve Performance
• Paste the code in console and type ‘Ctrl+R’. No need to navigate through
screens or authentication
• Change domain module to include only a reference of the parents key
instead of the whole object.
• Enable Hibernate’s second level of caching by adding suitable code to
DataSource.groovy and by making changes in the domain class

• Configure ehcache.xml
• Create indexes on parent classes after using explain on MySQL tables. This
improves performance marginally
• Cleaning up Gorm after doing batch inserts also helps
• Refer page for relevant code :
http://www.neevtech.com/blog/2013/02/08/improving-your-grailsapplication-performance-look-jim-no-stored-procedures/
The Real Bottleneck and the Solution
• The session cache was very large because Grails has FlushMode set to ‘AUTO’
• It was observed that Grails makes a Session ‘Flush’ before querying - this could be

reducing performance
The remedy is to:
• Import org.hibernate.FlushMode
• Include this line, session.setflushMode (FlushMode.COMMIT)
• Performance improvement after these changes - processes nearly 450k records in 1
hour as opposed to 20k records earlier in 2 hours.
• Refer for relevant code and more info :
http://www.neevtech.com/blog/2013/02/08/improving-your-grails-applicationperformance-look-jim-no-stored-procedures/
Clients
Partnerships
Neev Information Technologies Pvt. Ltd.
India - Bangalore

India - Pune

The Estate, # 121,6th Floor,

#13 L’Square, 3rd Floor

Dickenson Road

Parihar Chowk, Aundh,

Bangalore-560042

Pune – 411007.

Phone :+91 80 25594416

Phone : +91-64103338

USA

sales@neevtech.com
Sweden

Singapore

Neev AB, Birger Jarlsgatan
1121 Boyce Rd Ste 1400,
Pittsburgh PA 15241

Phone : +1 888-979-7860

#08-03 SGX Centre 2, 4

53, 6tr,

Shenton Way,

11145, Stockholm

Singapore 068807

Phone: +46723250723

Phone: +65 6435 1961

For more info on our offerings, visit www.neevtech.com

More Related Content

More from Neev Technologies

Building A Jewelry e-store - Now, sell your jewelry to the world!
Building A Jewelry e-store - Now, sell your jewelry to the world!Building A Jewelry e-store - Now, sell your jewelry to the world!
Building A Jewelry e-store - Now, sell your jewelry to the world!Neev Technologies
 
How to add Custom Font to your iOS-based App?
How to add Custom Font to your iOS-based App?How to add Custom Font to your iOS-based App?
How to add Custom Font to your iOS-based App?Neev Technologies
 
Our Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with AppsOur Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with AppsNeev Technologies
 
Neev Application Performance Management Services
Neev Application Performance Management ServicesNeev Application Performance Management Services
Neev Application Performance Management ServicesNeev Technologies
 
Neev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev Technologies
 
Mobile Responsive Design @ Neev
Mobile Responsive Design @ NeevMobile Responsive Design @ Neev
Mobile Responsive Design @ NeevNeev Technologies
 
Business Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevBusiness Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevNeev Technologies
 
Neev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Technologies
 
A Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry StoresA Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry StoresNeev Technologies
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source ContributionsNeev Technologies
 
Native Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNative Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNeev Technologies
 
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014Neev Technologies
 
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...Neev Technologies
 
Trendywalks - A Hybris-based eCommerce Store with Custom Features
Trendywalks - A Hybris-based eCommerce Store with Custom FeaturesTrendywalks - A Hybris-based eCommerce Store with Custom Features
Trendywalks - A Hybris-based eCommerce Store with Custom FeaturesNeev Technologies
 

More from Neev Technologies (20)

Gameathon @ Neev
Gameathon @ NeevGameathon @ Neev
Gameathon @ Neev
 
Building A Jewelry e-store - Now, sell your jewelry to the world!
Building A Jewelry e-store - Now, sell your jewelry to the world!Building A Jewelry e-store - Now, sell your jewelry to the world!
Building A Jewelry e-store - Now, sell your jewelry to the world!
 
Neev Load Testing Services
Neev Load Testing ServicesNeev Load Testing Services
Neev Load Testing Services
 
How to add Custom Font to your iOS-based App?
How to add Custom Font to your iOS-based App?How to add Custom Font to your iOS-based App?
How to add Custom Font to your iOS-based App?
 
Our Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with AppsOur Experience on Google Map Integration with Apps
Our Experience on Google Map Integration with Apps
 
Neev Application Performance Management Services
Neev Application Performance Management ServicesNeev Application Performance Management Services
Neev Application Performance Management Services
 
Drupal Capabilities @ Neev
Drupal Capabilities @ NeevDrupal Capabilities @ Neev
Drupal Capabilities @ Neev
 
Neev CakePHP Managed Services Offerings
Neev CakePHP Managed Services OfferingsNeev CakePHP Managed Services Offerings
Neev CakePHP Managed Services Offerings
 
Neev AngularJS Capabilities
Neev AngularJS CapabilitiesNeev AngularJS Capabilities
Neev AngularJS Capabilities
 
Mobile Responsive Design @ Neev
Mobile Responsive Design @ NeevMobile Responsive Design @ Neev
Mobile Responsive Design @ Neev
 
Business Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ NeevBusiness Intelligence Capabilities @ Neev
Business Intelligence Capabilities @ Neev
 
Neev Conversion Strategy Capabilities
Neev Conversion Strategy CapabilitiesNeev Conversion Strategy Capabilities
Neev Conversion Strategy Capabilities
 
RazorfishNeev - An Overview
RazorfishNeev - An OverviewRazorfishNeev - An Overview
RazorfishNeev - An Overview
 
A Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry StoresA Digital Mirror for Luxury Jewelry Stores
A Digital Mirror for Luxury Jewelry Stores
 
Neev Open Source Contributions
Neev Open Source ContributionsNeev Open Source Contributions
Neev Open Source Contributions
 
Native Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A ComparisonNative Mobile Platforms vs Phonegap – A Comparison
Native Mobile Platforms vs Phonegap – A Comparison
 
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014
Test Automation - Presented by Nagarajan, Architect @ TechCafe-2014
 
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...
That thing called Requirements - Presented by Mona Walia, Business Analyst @ ...
 
Hybris @ Neev
Hybris @ NeevHybris @ Neev
Hybris @ Neev
 
Trendywalks - A Hybris-based eCommerce Store with Custom Features
Trendywalks - A Hybris-based eCommerce Store with Custom FeaturesTrendywalks - A Hybris-based eCommerce Store with Custom Features
Trendywalks - A Hybris-based eCommerce Store with Custom Features
 

Recently uploaded

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
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 

Recently uploaded (20)

Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 

Improving the Performance of a Grails Application

  • 1. Improving the Performance of a Grails Application
  • 2. About Neev Web Mobile Magento eCommerce SaaS Applications Video Streaming Portals Rich Internet Apps Custom Development iPhone Android Windows Phone 7 HTML5 Apps Cloud AWS Consulting Partner Rackspace Joyent Heroku Google App Engine Key Company Highlights 250+ team with experience in managing offshore, distributed development. Neev Technologies established in Jan ’05 VC Funding in 2009 By Basil Partners User Interface Design and User Experience Design Part of Publicis Groupe Member of NASSCOM. Performance Consulting Practices Development Centers in Bangalore and Pune. Quality Assurance & Testing Outsourced Product Development Offices at Bangalore, USA, Delhi, Pune, Singapore and Stockholm.
  • 3. The Scenario used for Testing Grails Application Performance • Medium EC2 with RDS having no IOPS • Grails 2.1.1 environment with a number of plugins • Huge DB with transactions trying to insert as many as 100k records • New setup was limited in terms of CPU and memory resources and therefore reveal more glaring mistakes in code with regard to performance considerations
  • 4. What helps to Improve Performance • Paste the code in console and type ‘Ctrl+R’. No need to navigate through screens or authentication • Change domain module to include only a reference of the parents key instead of the whole object. • Enable Hibernate’s second level of caching by adding suitable code to DataSource.groovy and by making changes in the domain class • Configure ehcache.xml • Create indexes on parent classes after using explain on MySQL tables. This improves performance marginally • Cleaning up Gorm after doing batch inserts also helps • Refer page for relevant code : http://www.neevtech.com/blog/2013/02/08/improving-your-grailsapplication-performance-look-jim-no-stored-procedures/
  • 5. The Real Bottleneck and the Solution • The session cache was very large because Grails has FlushMode set to ‘AUTO’ • It was observed that Grails makes a Session ‘Flush’ before querying - this could be reducing performance The remedy is to: • Import org.hibernate.FlushMode • Include this line, session.setflushMode (FlushMode.COMMIT) • Performance improvement after these changes - processes nearly 450k records in 1 hour as opposed to 20k records earlier in 2 hours. • Refer for relevant code and more info : http://www.neevtech.com/blog/2013/02/08/improving-your-grails-applicationperformance-look-jim-no-stored-procedures/
  • 8. Neev Information Technologies Pvt. Ltd. India - Bangalore India - Pune The Estate, # 121,6th Floor, #13 L’Square, 3rd Floor Dickenson Road Parihar Chowk, Aundh, Bangalore-560042 Pune – 411007. Phone :+91 80 25594416 Phone : +91-64103338 USA sales@neevtech.com Sweden Singapore Neev AB, Birger Jarlsgatan 1121 Boyce Rd Ste 1400, Pittsburgh PA 15241 Phone : +1 888-979-7860 #08-03 SGX Centre 2, 4 53, 6tr, Shenton Way, 11145, Stockholm Singapore 068807 Phone: +46723250723 Phone: +65 6435 1961 For more info on our offerings, visit www.neevtech.com