John Cox

Blogs · @wyome

Tagged performance · everything

Internet Super Hero » Blog Archive » PHP: Client side caching for all MySQL extensions

This article introduces a C-based mysqlnd plugin that adds query result caching to PHP's MySQL extensions (ext/mysql, ext/mysqli, PDO_MySQL) without modifying existing APIs, operating transparently as a middleware layer between applications and the database server. Cached results can be stored in multiple backends (memory, APC, Memcache, SQLite) with configurable TTL-based invalidation, and includes a "slam defense" mechanism to prevent database overload when popular cache entries expire simultaneously. The plugin avoids the serialization overhead of PHP-based caching solutions by intercepting and replaying raw wire data at the driver level, though it only works with buffered queries and relies on SQL comments to control which queries are cached.

Permalink

HTML5Rocks - Home

This is a hub page from Google's Chrome team that organizes learning resources for web developers across multiple topic areas including performance, accessibility, payment processing, and progressive web apps, with links to courses, blog posts, and guides designed to help developers build fast, secure, and inclusive websites.

Permalink

Efficiently Rendering CSS | CSS-Tricks

Browsers parse CSS selectors right-to-left, starting with the "key selector," making ID selectors fastest and universal selectors slowest; avoiding tag-qualified selectors (like `ul#nav`) and long descendant chains improves efficiency. While CSS3 selectors like `:nth-child` are more resource-intensive than simple selectors, modern computers have made CSS rendering efficiency less critical than it was a decade ago, so following best practices (unqualified IDs, avoiding deep descendant chains, leveraging CSS cascading) is sensible without being dogmatic about it. The real lesson is balancing performance optimization with semantic markup and maintainability—giving every element a unique ID for speed would be technically fast but practically ridiculous.

Permalink

pChart | a PHP Charting library

pChart is a free, open-source PHP framework for generating anti-aliased charts that can pull data from SQL queries, CSV files, or manual input, with a focus on rendering quality and performance optimization. The library requires PHP with GD support and includes a caching class (pCache) to reduce server load by storing computed charts for reuse across multiple users. Recent versions have added features like scatter plots, customizable axes, transparent text areas, and support for missing data points.

Permalink

Bit Twiddling Hacks

This is a comprehensive reference collection of bit manipulation techniques and algorithms for common low-level computing operations, with thoroughly tested code snippets offered in the public domain. The collection covers methods for operations like counting set bits, reversing bit sequences, finding logarithms, detecting powers of two, and manipulating individual bits—each with multiple approaches optimized for different trade-offs between speed, memory usage, and portability. The author notes that all code has been verified and offers a bounty for any bugs found.

Permalink

Troubleshooting "My Computer" Opening Slowly on Windows XP :: the How-To Geek

When "My Computer" opens slowly in Windows, it's typically because the system is searching for network folders and printers before displaying the window. The fix is straightforward: access Folder Options from Windows Explorer's Tools menu, go to the View tab, and uncheck "Automatically search for network folders and printers." This change takes effect immediately and resolves the hanging behavior.

Permalink

Web Site Optimization: 13 Simple Steps [Apache & IIS Configuration]

Stefanov provides practical guidance on implementing Yahoo's 13 front-end performance optimization rules for web developers with limited budgets on shared hosting. The piece covers four categories of optimization: reducing HTTP requests (identified as most impactful), leveraging content delivery networks, hosting assets across multiple domains while minimizing DNS lookups, and specific techniques for scripts and stylesheets. The recommendations are grounded in concrete examples and acknowledge the constraints of shared hosting environments where Apache configuration access is often restricted.

Permalink

Speed Up Windows Vista: Use ReadyBoost

Vista's ReadyBoost feature uses USB flash drives to cache disk reads, speeding up random hard drive access without replacing RAM or improving gaming performance. The system encrypts cached data for security, and setup is automatic—just plug in a USB drive and select ReadyBoost from the detection menu, with Windows recommending an optimal cache size. While not equivalent to a RAM upgrade, ReadyBoost offers measurable performance gains for the minimal cost of a flash device.

Permalink

Speed Up Your Javascript Load Time

This piece explains practical techniques for reducing JavaScript bloat on websites, which negatively impacts page load times. It covers measurement tools to identify problem files, compression methods using YUI Compressor, strategic placement of scripts at the end of HTML documents, dynamic on-demand loading via AJAX patterns, browser caching strategies, and combining multiple files into fewer requests. The author emphasizes balancing optimization with maintainability, such as keeping uncompressed debug versions for testing before deploying minified code to production.

Permalink

OpenSTA Users Home Page - Free Web Load and Stress Testing Tool

OpenSTA is a free, open-source distributed testing architecture for performing HTTP/HTTPS load tests and stress testing on web applications, originally developed as commercial software but released under the GNU GPL. Users record test scripts in their browsers and replay them through a load generation engine to simulate hundreds or thousands of virtual users while collecting performance data through timers, SNMP statistics, and Windows Performance Monitor metrics. The project is community-supported and developed by users, with resources including documentation, a FAQ, community portal, and mailing list for support and discussion.

Permalink

DB Normalization

Database normalization—organizing data into multiple related tables with fewer columns each—improves performance through faster sorting, more efficient indexes, and reduced null values, though excessive joins across many tables can become counterproductive. Key design principles include giving each table a unique primary key identifier, storing data for only one entity type per table, minimizing nullable columns, and avoiding repeating values by using separate linked tables instead. When complete redesign isn't feasible, selective normalization of large tables or the use of views can achieve better design without disrupting existing applications.

Permalink

Speed Test | Home

Ookla operates two consumer-focused platforms: Speedtest, which allows users to measure their internet speed and performance metrics, and Downdetector, which aggregates user reports to identify outages and service disruptions across websites and apps. Together these tools have amassed over 60 billion speed tests and handle 25 million monthly incident reports, positioning them as dominant platforms for helping consumers understand and troubleshoot their connectivity experiences.

Permalink

Configuring Apache for Maximum Performance LG #123

This guide explains how to optimize Apache web server performance on Linux systems through compile-time and runtime configuration adjustments rather than hardware upgrades. Key recommendations include loading only necessary modules, selecting appropriate Multi-Processing Modules, disabling DNS lookups, tuning process limits (MaxClients, MinSpareServers, MaxSpareServers), enabling HTTP compression via mod_deflate, and implementing client-side caching headers. The author also advocates for a split-server architecture using a lightweight front-end Apache to serve static content and forwarding dynamic requests to a heavier back-end server, which prevents memory waste from large processes handling small static files.

Permalink