Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Performance Optimizing Tips
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Oanh Nguyen
November 11, 2015
Programming
0
17
Performance Optimizing Tips
Some performance optimizing tips
Oanh Nguyen
November 11, 2015
Tweet
Share
More Decks by Oanh Nguyen
See All by Oanh Nguyen
Tư duy caching trong lập trình Web
oanhnn
0
350
Other Decks in Programming
See All in Programming
ファインチューニングせずメインコンペを解く方法
pokutuna
0
150
Pythonデータ分析コトハジメinFukuoka
kanan
0
100
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.1k
安いハードウェアでVulkan
fadis
1
770
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
150
The free-lunch guide to idea circularity
hollycummins
0
340
Nostalgia Meets Technology: Super Mario with TypeScript
manfredsteyer
PRO
0
110
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
330
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
180
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
430
PHP でエミュレータを自作して Ubuntu を動かそう
m3m0r7
PRO
2
140
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
270
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
280
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
500
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
990
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1k
First, design no harm
axbom
PRO
2
1.1k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
77
ラッコキーワード サービス紹介資料
rakko
1
2.7M
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
250
Transcript
PERFORMANCE OPTIMIZING TIPS FOR PHP WEBSITE OanhNN & QuangNV
Content: • Web system • Web resources • How gzip
compression works • HTTP Caching • PHP performance tips • Others
Web system Database Cache DB (memcached, apc, …) Web App
(PHP, ASP, JSP, …) Web resources (css, js, img, …) Web server + HTTP Cache Web browser, App client
Web resources: • HTML (static page) • CSS • Javascript
• Images • ….
HTML • Use HTML 5: new, lightweight, … • According
to the HTML 4 DTD, you can omit the following tags. • Combine external JavaScript files • Include external CSS files before external JavaScript files
CSS • Remove unused CSS. • Using every declaration just
once means making strict use of selector grouping. • Minify CSS files.
Javascript (js) • Optimizing JavaScript code • Speeding up JavaScript:
Working with the DOM • Minify JavaScript • Compressing your JavaScript with Closure Compiler • Use Asynchronous load
Images & Web graphics • Compress images (TinyPNG) • Use
a lot of small images on big images • Use lazy load • Optimizing canvas draw
Gzip
Gzip • Browser: • Connects to server. • Notifies server
that browser supports gzip "Accept-Encoding: gzip". • Server: • Acknowledges gzip support. • Sends gzip encoded page with header "Content-Encoding: gzip". • Browser: • Receive page. • Decode gzip encoded page based on header "Content-Encoding: gzip". • Display page.
HTTP Caching
PHP performance tips • Upgrade your version of PHP •
Use caching • Use output buffering • Avoid writing naive setters and getters • Don't copy variables for no reason • Avoid doing SQL queries within a loop • Sometimes, performance of native PHP function is not best
native function vs. defined function
native function vs. defined function
Others • Using HTML 5 for performance improvements • Store
web resources on diff • Reduce the number of requests and the amount of data transferred
References • https://developers.google.com/speed/articles • https://developers.google.com/speed/articles/optimizing-i mages • http://phpmaster.com/
Q&A