Saturday, August 2, 2014

Eclipse commands

  • To make Format:  ESc +Ctrl+F
  • To proper indentation :  ctrl+I
  • Add block comment: SHIFT + CTRL+ /
  • remove block comment: SHIFT + CTRL+ \
  • Matching tag: Shift + Ctrl+ >
  • Matching Bracket: Shift + Ctrl+ P
  • Open declaration: F3 or Ctrl+ left-click
  • Last edit location: Ctrl+Q
  • Back : Alt + left arrow
  • Next : Alt + right arrow
  • Key Assist: Ctrl+Alt+L

Sunday, March 30, 2014

Drupal 7 performance options and tips

Some basic configuration practice

  • Non-essential modules: Disable and uninstall unused and non-essential modules.
  • Statistics module: Disable the statistics module as it puts an extra load on the database with every hit. 
  • Update manager module: Disable the Update Manager module on Production 
  • Drupal cache: Enable site-wide caching over at Administer » Configuration » Development » Performance.
  • CSS/JS Aggregation: Improve CSS/JS performance with Advanced CSS/JS Aggregation or Aggregate

System administration

  • APC:  Alternative PHP Cache (APC) for PHP < 5.5.  (This is available in new version of  core PHP)
  • Nginx:  This is one of  alternatives to Apache Web server.
  • Syslog:  Saves all logs to your operating system instead of the database.
  • Solid state drives (SSDs):  You have to pay more cost. If it spans in your budget, then go to SSD option in place of tradional HDD.
  • Cron jobs: Disable unnecassary cron jobs
  • Improve CSS/JS performance with Advanced CSS/JS Aggregation or Aggregate cache

Cache Replacements

  • The default Drupal-site caching is not very efficient. As a result, alternative mechanisms have sprung up to fill the void.
  • Memcache API and Integration or Memcache Storage
  • File Cache
  • Redis (a key-value store)
  • Specific Components optimization
  • Minify JS files to reduce the fils size.
  • React to page-not-found errors quicker with Fast 404.
  • Cache components with logged-in users via Authenticated User Page Caching (Authcache).
  • You can use CSS sprite images for theme images to reduce the HTTP request.
  • Load images only when needed with Image Lazyloader or similar modules.

External Caching

  • Varnish - Basically, Varnish handles serving static files and anonymous page-views for your site much faster and at higher volumes than Apache, in the neighborhood of 3000 requests per second.
  • Cache Expiration - This module provides configurable actions upon events that will expire URLs from caches like reverse proxy caches, internal page caches, etc.
  • Boost module - for shared servers, then you can run Boost instead.
  • Services -There are several services that can be used in conjunction with your Drupal site to monitor and/or increase performance.
  • Content delivery networks (CDNs)
  • ProjectPAAS - along with its connector module: Drupal-specific performance service.
  • New Relic: General performance monitoring that supports Drupal. Works nicely with Pantheon.
  • BlazeMeter Module - for Load and Performance Testing