background preloader

Optimization

Facebook Twitter

Seo

Deduplication. Use sitemap standards to help search engines. Code Beautifier: Formatador e Optimizador de CSS. Online CSS Optimiser / Optimizer. Supercharged Javascript. Filed: Sun, Feb 04 2007 under Programming|| Tags: .htaccess php compress concatenate javascript As frameworks like prototype, jquery, and YUI become more and more popular, external javascript loads grow dramatically -- dragging down the performance of your page.

Compressing the javascript statically (covered in Compressed HTML Makes Your Pages Zippy) is one option to regain page-loading efficiency, however if you change one file you'll need to make a new compressed copy and that's quite a bit of maintenance work. Pre-compression also doesn't solve a multiple connection issue.

That is for each external javascript library your page uses, the page will need to open and initiate a new http connection and current best practice theory says that you want to limit, as much as possible, the number of connections your web page initiates on page load. Introduction If you have access to an apache web-server and php scripts, there is a simple, elegant solution that will let you turn this... Into this... PMD - PMD. Nimble Method: Guerrilla's Guide to Optimizing Rails Applications. The Battle For Performance Rails is slow. Your rails application which does fairy simple database operations will be born slow and will eventually become slower and slower while still not doing anything fancy.

That's like getting a new powerful locomotive (on Rails) together with a free bonus of overladen freight cars. Having said that, I can virtually hear the herd of voices screaming "dude, optimize your own application and don't blame Ruby and Rails for everything". Sure thing, our application isn't perfect and I do believe it can be optimized but you can't win the performance battle just by that. The winning tactics for this battle is guerrilla tactics. Ruby-Prof: The Guerrilla's Weapon Acunote, our pet rails application, often need to copy a bunch of ActiveRecord (AR) objects. Let's measure 3 things: So, for "copy 120" request we get: Request time (without profiler): 13.6 sec. "WTF" politely describes my initial reaction when I first saw that.

Task#save ... Great! Ok. That's it. Whoa! Bamboo Blog - Database Optimization for Rails Apps. Summary Use STRAIGHT_JOIN if MySQL is doing something sillyMySQL Datetimes are not slow MyISAM is much, much faster than InnoDB Consider MySQL partitioning; it's not hard Watch out for background optimisation and query caching Log everything you do, and why The reporting application I'm working on does a date-range select against a table with ten million rows. It took over two minutes to execute. I cut it down to around two seconds without significantly changing the application. Here's how. Straight Joins The original SQL statement was 12 lines, featuring three joins, a group-by and a computed column. To start with I used EXPLAIN SELECT to look at the execution plan. I added STRAIGHT_JOIN to the SQL statement and dropped the execution time to 20 seconds. Use STRAIGHT_JOIN if MySQL is doing something silly.

Finding the Weak Point Progress; MySQL was now table-scanning a 10 million row 'events' table to satisfy the WHERE clause, then joining the other three tables by ID, grouping and summing. Top 10 Ruby on Rails performance tips. Indexes made handy in SQL Server. Jeremy Kadlec of Edgewood Solutions When starting an application, you should be able to identify many of the indexes based on a reasonable set of rules. As the application grows and changes, the indexes should be reviewed to ensure no good index candidates are overlooked.

It should be based on how the application is used not based on theory. In the same light, make sure erroneous, duplicate or valueless indexes are removed. This is a precautionary measure to make certain your SQL Server does not have to manage unneeded indexes. In this tip we will identify index recommendations, index creation and index validation. A common question for many DBAs and developers, relates to the traditional columns recommended for indexes. Primary Key's Foreign Premium Access for unlimited access to our premium content across our network of over 70 information Technology web sites. By submitting you agree to receive email from TechTarget and its partners. This was first published in September 2006 Key's.