SlideShare a Scribd company logo
BASIC APPLICATION OPTIMIZATION
TECHNIQUES (BACKEND)
JAB 17
Klas Berlič Fras
ABOUT ME
A founder of a boutique web and marketing communications agency Drzno,
providing integrated communication solutions with focus on the digital
communication and website development.
Marketing communication strategies. Design. Digital communication.
ABOUT ME
I try to do different stuff differently 
ABOUT ME
• Organized 48 hours music festival featuring Guano Apes (German band
performing on MTV awards at the time)
• Published a poetry book
• Ran 3 consecutive political marketing campaigns. We won in all 3.
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
Basic Application Performance Optimization Techniques (Backend)
ČELAN VIDEO
BELMONDO.SI
COMMON BOTTLENECKS
• Poorly designed database (Joomla permissions in JSON) and slow queries
• Expensive CPU operations: image resizing, calculations
• Expensive network operations: webservices, network disks
• Filesystem operations: even with SSD disks there will still be a significant amount
of latency
• All of the above inside a loop
ARCHITECTURE
Abstraction and flexibility are enemies of the performance
User interface, sofware interfaces, dependency injection, service layer, multiple
layers . The reason that each major Joomla release gets slower.
WHY?
WHY?
ARCHITECTURE
Execution trees – class that calls class.. and another ..and few another.
For each class file has to be loaded -> Anything that involves I/O operations is slow.
UI - data has to be stored somewhere, usually in DB – database lookups are much
slower than e.g. variables read from a config file on app initialisation.
Tradeoff between performance and flexibility.
ARCHITECTURE – DOS
UI only for user configurable options, file config for developer settings.
ARCHITECTURE – DOS
Design APIs to allow processing multiple items in a single call
ARCHITECTURE – DON‘T
Joomla Custom Fields and Tags
ARCHITECTURE – DOS
Parallel processing – yes, even in PHP.
 Pthreads http://pthreads.org
http://docs.php.net/manual/en/book.pthreads.php
 Using CURL to make parallel requests to php scripts :
https://github.com/marcushat/rollingcurlx
 And since SOAP https://github.com/Meabed/asynchronous-soap
ARCHITECTURE – DOS
ARCHITECTURE – DOS
Delegate some work to the client.
 Clientside rendering: supply data, render in a browser
Basic Application Performance Optimization Techniques (Backend)
CODE OPTIMIZATION
TOOLS
• Joomla debug output. Please use it.
• Xdebug profile + KCacheGrind (QCacheGrind for Windows)
• Z-ray http://www.zend.com/en/products/server/z-ray (there is plugin for Joomla)
• Blackfire https://blackfire.io
• PHPStorm
TOOLS
TOOLS
DATABASE AND QUERY
OPTIMIZATION
Query construction
• Reduce the amount of data selected in a query to only be what is required (i.e.
Type the "select" fields manually instead of using "select *")
• Don’t f.. store JSON in a relational database.
• Split complex queries into multilple calls
DATABASE AND QUERY
OPTIMIZATION
Indexes – the same as in a book. Index data is ordered according to order of columns
in create table - mysql knows where to look for data e.g. in a range from 5-10 or all
record starting with k.
• Indexes can make dramatic improvements
• B-tree indexes on columns found in WHERE, JOIN columns
• Leftmost column – MySQL can only search in it
DATABASE AND QUERY
OPTIMIZATION
Indexes – the same as in a book. Index data is ordered according to order of columns
in create table - mysql knows where to look for data e.g. in a range from 5-10 or all
record starting with k.
• Indexes can make dramatic improvements
• B-tree indexes on columns found in WHERE, JOIN columns
• Leftmost column – MySQL can only search in it
DATABASE AND QUERY
OPTIMIZATION
• Covering index – contains all data, not only conditional one
• Full text index – similar to search engines search, for MATCH operations
• Indexes are not used when optimizer determines result set will be too big
compared to all possible rows. Rule of thumb: 15-20%.
• In InnoDB you don‘t need to include pk in indexes, it is already included
• You might need to create indexes with same columns in different order
DATABASE AND QUERY
OPTIMIZATION
• Covering index – contains all data, not only conditional one
• Full text index – similar to search engines search, for MATCH operations
• Indexes are not used when optimizer determines result set will be too big
compared to all possible rows. Rule of thumb: 15-20%.
• In InnoDB you don‘t need to include pk in indexes, it is already included
• You might need to create indexes with same columns in different order
CACHING AND PRELOADING
Store already retrieved data for faster reuse. Can be combined with preloading
• It all boils down to selecting the right caching unit and cache invalidation.
Can be tricky – start simple and iterate - improve until you get the perfect result.
• Break execution cycle in smaller pieces
unless you are rendering a very simple page that generally doesn’t need cashing
at all, cache smaller pieces
• Best caching candidates
often reused data/processes and very expensive operations. Cache remote
resources whenever possible, there is no such thing as fast webservice.
• Choose memory based storage (Memcached, APCu etc).
CACHING AND PRELOADING
Caching types
• Variable caching
short lived cache that only lives during single execution cycle. Often used data is
stored in a (static) property
• J Method results caching
J implementation works fine for procedural methods or static methods, avaoid
with methods that depend on object property values. For those use J raw cache
(serialization?)
CACHING AND PRELOADING
• J Data caching
use J raw cache to store compiled datasets: queries, webservices
• J “auto” caching (view cache, cache plugin modules caching)
usable when application output only depends on URL parameters (non-
authenticated, no data from cookies or session).
• Http caching
server side, Varnish and similar, same rule as previous point.
CACHING AND PRELOADING
CACHING AND PRELOADING
Preloading
Preload frequently needed data into memory e.g. on application initialization
BUT PLEASE
CACHING AND PRELOADING
Don‘t blindly preload all items.
For 1000 concurent users == 80 GB of RAM.
CACHING AND PRELOADING
Not a realistic scenario?
CACHING AND PRELOADING
You should really use the internet some more..
CACHING AND PRELOADING
You should really use the internet some more..
Membership sites. Yes, in Joomla (not this one).
OTHER
• Use PHP 7: 40% faster
• Activate PHP opcode caching – reads files and compiles them to machine code,
without it script needs to be compiled each time. Built-in OpCache in php7 (Also
Wincache, Zend optimizer) or APC/Xcache for previous versions
• HHVM: J3.7. is compatible
• Server infrastructure: Database replication, load balancing, clouds etc.
THANK YOU 

More Related Content

What's hot (18)

PPT
Orm and hibernate
s4al_com
 
PDF
hbaseconasia2017: HBase on Beam
HBaseCon
 
PPT
Drupalcamp Estonia - High Performance Sites
drupalcampest
 
PDF
Data cache management in php
Andrew Yatsenko
 
PDF
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Handrus Nogueira
 
PDF
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!
Taller Negócio Digitais
 
PPT
Database2011 MySQL Sharding
Moshe Kaplan
 
PPT
IWMW 1998: Publishing and devolving the maintenance of a prospectus prospectus
IWMW
 
PPT
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
Sencha
 
PPTX
Building Ext JS Using HATEOAS - Jeff Stano
Sencha
 
PPTX
Microsoft Web Technology Stack
Lushanthan Sivaneasharajah
 
PPTX
Introduction to CosmosDB - Azure Bootcamp 2018
Josh Carlisle
 
PDF
High performance website
Chamnap Chhorn
 
PPTX
ORM Methodology
Ahmed Gomaa
 
PDF
Asp.Net 3 5 Part 1
asim78
 
PDF
Web Application Performance Audit and Optimization
Zyxware Technologies
 
PDF
Heterogenous Persistence
Jervin Real
 
PDF
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Lucas Arruda
 
Orm and hibernate
s4al_com
 
hbaseconasia2017: HBase on Beam
HBaseCon
 
Drupalcamp Estonia - High Performance Sites
drupalcampest
 
Data cache management in php
Andrew Yatsenko
 
Escalando php e drupal- performance ao infinito e além! - Drupal camp sp 2015
Handrus Nogueira
 
DrupalCamp SP 2015 - Escalando PHP e Drupal- Performance ao infinito e além!
Taller Negócio Digitais
 
Database2011 MySQL Sharding
Moshe Kaplan
 
IWMW 1998: Publishing and devolving the maintenance of a prospectus prospectus
IWMW
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
Sencha
 
Building Ext JS Using HATEOAS - Jeff Stano
Sencha
 
Microsoft Web Technology Stack
Lushanthan Sivaneasharajah
 
Introduction to CosmosDB - Azure Bootcamp 2018
Josh Carlisle
 
High performance website
Chamnap Chhorn
 
ORM Methodology
Ahmed Gomaa
 
Asp.Net 3 5 Part 1
asim78
 
Web Application Performance Audit and Optimization
Zyxware Technologies
 
Heterogenous Persistence
Jervin Real
 
Escalando PHP e Drupal: performance ao infinito e além! - DrupalCamp SP 2015
Lucas Arruda
 

Similar to Basic Application Performance Optimization Techniques (Backend) (20)

PDF
From a student to an apache committer practice of apache io tdb
jixuan1989
 
PPTX
Challenges of Implementing an Advanced SQL Engine on Hadoop
DataWorks Summit
 
PPTX
Best Practices for WordPress in Enterprise
Taylor Lovett
 
PDF
Best practices-wordpress-enterprise
Taylor Lovett
 
PDF
071410 sun a_1515_feldman_stephen
Steve Feldman
 
PDF
Drupal performance and scalability
Twinbit
 
PDF
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
PDF
Write Generic Code with the Tooling API
Adam Olshansky
 
PPTX
Webinar: Scaling MongoDB
MongoDB
 
PPTX
Dataweek-Talk-2014
ardan-bkennedy
 
PPTX
Old code doesn't stink
Martin Gutenbrunner
 
PDF
Meta scale kognitio hadoop webinar
Michael Hiskey
 
PPT
Webinar: High Performance MongoDB Applications with IBM POWER8
MongoDB
 
PPTX
Old code doesn't stink - Detroit
Martin Gutenbrunner
 
PPT
AWS (Hadoop) Meetup 30.04.09
Chris Purrington
 
PDF
Challenges of Building a First Class SQL-on-Hadoop Engine
Nicolas Morales
 
PDF
Hpc lunch and learn
John D Almon
 
PDF
Low Latency Polyglot Model Scoring using Apache Apex
Apache Apex
 
PPTX
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
PPTX
Using Compass to Diagnose Performance Problems
MongoDB
 
From a student to an apache committer practice of apache io tdb
jixuan1989
 
Challenges of Implementing an Advanced SQL Engine on Hadoop
DataWorks Summit
 
Best Practices for WordPress in Enterprise
Taylor Lovett
 
Best practices-wordpress-enterprise
Taylor Lovett
 
071410 sun a_1515_feldman_stephen
Steve Feldman
 
Drupal performance and scalability
Twinbit
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Write Generic Code with the Tooling API
Adam Olshansky
 
Webinar: Scaling MongoDB
MongoDB
 
Dataweek-Talk-2014
ardan-bkennedy
 
Old code doesn't stink
Martin Gutenbrunner
 
Meta scale kognitio hadoop webinar
Michael Hiskey
 
Webinar: High Performance MongoDB Applications with IBM POWER8
MongoDB
 
Old code doesn't stink - Detroit
Martin Gutenbrunner
 
AWS (Hadoop) Meetup 30.04.09
Chris Purrington
 
Challenges of Building a First Class SQL-on-Hadoop Engine
Nicolas Morales
 
Hpc lunch and learn
John D Almon
 
Low Latency Polyglot Model Scoring using Apache Apex
Apache Apex
 
SharePoint 2013 Performance Analysis - Robi Vončina
SPC Adriatics
 
Using Compass to Diagnose Performance Problems
MongoDB
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Python basic programing language for automation
DanialHabibi2
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Ad

Basic Application Performance Optimization Techniques (Backend)

  • 1. BASIC APPLICATION OPTIMIZATION TECHNIQUES (BACKEND) JAB 17 Klas Berlič Fras
  • 2. ABOUT ME A founder of a boutique web and marketing communications agency Drzno, providing integrated communication solutions with focus on the digital communication and website development. Marketing communication strategies. Design. Digital communication.
  • 3. ABOUT ME I try to do different stuff differently 
  • 4. ABOUT ME • Organized 48 hours music festival featuring Guano Apes (German band performing on MTV awards at the time) • Published a poetry book • Ran 3 consecutive political marketing campaigns. We won in all 3.
  • 13. COMMON BOTTLENECKS • Poorly designed database (Joomla permissions in JSON) and slow queries • Expensive CPU operations: image resizing, calculations • Expensive network operations: webservices, network disks • Filesystem operations: even with SSD disks there will still be a significant amount of latency • All of the above inside a loop
  • 14. ARCHITECTURE Abstraction and flexibility are enemies of the performance User interface, sofware interfaces, dependency injection, service layer, multiple layers . The reason that each major Joomla release gets slower.
  • 15. WHY?
  • 16. WHY?
  • 17. ARCHITECTURE Execution trees – class that calls class.. and another ..and few another. For each class file has to be loaded -> Anything that involves I/O operations is slow. UI - data has to be stored somewhere, usually in DB – database lookups are much slower than e.g. variables read from a config file on app initialisation. Tradeoff between performance and flexibility.
  • 18. ARCHITECTURE – DOS UI only for user configurable options, file config for developer settings.
  • 19. ARCHITECTURE – DOS Design APIs to allow processing multiple items in a single call
  • 20. ARCHITECTURE – DON‘T Joomla Custom Fields and Tags
  • 21. ARCHITECTURE – DOS Parallel processing – yes, even in PHP.  Pthreads http://pthreads.org http://docs.php.net/manual/en/book.pthreads.php  Using CURL to make parallel requests to php scripts : https://github.com/marcushat/rollingcurlx  And since SOAP https://github.com/Meabed/asynchronous-soap
  • 23. ARCHITECTURE – DOS Delegate some work to the client.  Clientside rendering: supply data, render in a browser
  • 26. TOOLS • Joomla debug output. Please use it. • Xdebug profile + KCacheGrind (QCacheGrind for Windows) • Z-ray http://www.zend.com/en/products/server/z-ray (there is plugin for Joomla) • Blackfire https://blackfire.io • PHPStorm
  • 27. TOOLS
  • 28. TOOLS
  • 29. DATABASE AND QUERY OPTIMIZATION Query construction • Reduce the amount of data selected in a query to only be what is required (i.e. Type the "select" fields manually instead of using "select *") • Don’t f.. store JSON in a relational database. • Split complex queries into multilple calls
  • 30. DATABASE AND QUERY OPTIMIZATION Indexes – the same as in a book. Index data is ordered according to order of columns in create table - mysql knows where to look for data e.g. in a range from 5-10 or all record starting with k. • Indexes can make dramatic improvements • B-tree indexes on columns found in WHERE, JOIN columns • Leftmost column – MySQL can only search in it
  • 31. DATABASE AND QUERY OPTIMIZATION Indexes – the same as in a book. Index data is ordered according to order of columns in create table - mysql knows where to look for data e.g. in a range from 5-10 or all record starting with k. • Indexes can make dramatic improvements • B-tree indexes on columns found in WHERE, JOIN columns • Leftmost column – MySQL can only search in it
  • 32. DATABASE AND QUERY OPTIMIZATION • Covering index – contains all data, not only conditional one • Full text index – similar to search engines search, for MATCH operations • Indexes are not used when optimizer determines result set will be too big compared to all possible rows. Rule of thumb: 15-20%. • In InnoDB you don‘t need to include pk in indexes, it is already included • You might need to create indexes with same columns in different order
  • 33. DATABASE AND QUERY OPTIMIZATION • Covering index – contains all data, not only conditional one • Full text index – similar to search engines search, for MATCH operations • Indexes are not used when optimizer determines result set will be too big compared to all possible rows. Rule of thumb: 15-20%. • In InnoDB you don‘t need to include pk in indexes, it is already included • You might need to create indexes with same columns in different order
  • 34. CACHING AND PRELOADING Store already retrieved data for faster reuse. Can be combined with preloading • It all boils down to selecting the right caching unit and cache invalidation. Can be tricky – start simple and iterate - improve until you get the perfect result. • Break execution cycle in smaller pieces unless you are rendering a very simple page that generally doesn’t need cashing at all, cache smaller pieces • Best caching candidates often reused data/processes and very expensive operations. Cache remote resources whenever possible, there is no such thing as fast webservice. • Choose memory based storage (Memcached, APCu etc).
  • 35. CACHING AND PRELOADING Caching types • Variable caching short lived cache that only lives during single execution cycle. Often used data is stored in a (static) property • J Method results caching J implementation works fine for procedural methods or static methods, avaoid with methods that depend on object property values. For those use J raw cache (serialization?)
  • 36. CACHING AND PRELOADING • J Data caching use J raw cache to store compiled datasets: queries, webservices • J “auto” caching (view cache, cache plugin modules caching) usable when application output only depends on URL parameters (non- authenticated, no data from cookies or session). • Http caching server side, Varnish and similar, same rule as previous point.
  • 38. CACHING AND PRELOADING Preloading Preload frequently needed data into memory e.g. on application initialization
  • 40. CACHING AND PRELOADING Don‘t blindly preload all items. For 1000 concurent users == 80 GB of RAM.
  • 41. CACHING AND PRELOADING Not a realistic scenario?
  • 42. CACHING AND PRELOADING You should really use the internet some more..
  • 43. CACHING AND PRELOADING You should really use the internet some more.. Membership sites. Yes, in Joomla (not this one).
  • 44. OTHER • Use PHP 7: 40% faster • Activate PHP opcode caching – reads files and compiles them to machine code, without it script needs to be compiled each time. Built-in OpCache in php7 (Also Wincache, Zend optimizer) or APC/Xcache for previous versions • HHVM: J3.7. is compatible • Server infrastructure: Database replication, load balancing, clouds etc.

Editor's Notes

  • #3: Poenostavljeno rečeno..
  • #4: Poenostavljeno rečeno..
  • #5: Poenostavljeno rečeno..
  • #6: Poenostavljeno rečeno..
  • #7: Poenostavljeno rečeno..
  • #8: Poenostavljeno rečeno..
  • #10: Poenostavljeno rečeno..
  • #11: Poenostavljeno rečeno..
  • #12: Poenostavljeno rečeno..
  • #13: Poenostavljeno rečeno..
  • #14: Poenostavljeno rečeno..
  • #26: Poenostavljeno rečeno..
  • #27: Poenostavljeno rečeno..
  • #28: Poenostavljeno rečeno..
  • #29: Poenostavljeno rečeno..
  • #30: Poenostavljeno rečeno..
  • #31: Poenostavljeno rečeno..
  • #32: Poenostavljeno rečeno..
  • #33: Poenostavljeno rečeno..
  • #34: Poenostavljeno rečeno..
  • #35: Poenostavljeno rečeno..
  • #36: Poenostavljeno rečeno..
  • #37: Poenostavljeno rečeno..
  • #38: Poenostavljeno rečeno..
  • #39: Poenostavljeno rečeno..
  • #40: Poenostavljeno rečeno..
  • #41: Poenostavljeno rečeno..
  • #42: Poenostavljeno rečeno..
  • #43: Poenostavljeno rečeno..
  • #44: Poenostavljeno rečeno..
  • #45: Poenostavljeno rečeno..