Have Zend Studio and Eclipse PDT faster with Magento projects: the build path configuration

Eclipse PDT editors like Zend Studio analyse the PHP source code to enable autocompletion: they analyze source files and index content found in

Magento embeds more than 10000 files (7000 php files) in Magento Do we need to index all content? no

To ensure that eclipse and Zend studio will offer you all the expected functionalities, you can make it faster, by removing all the non required editor files from editing build path.

What is Zend studio and Eclipse PDT build path?

Build path defines classpath for your project: folders that will be analyzed by editors to index content and where look for methods.

All build path sources defined within will be made available for Content Assist options, including source code completion

Basic configuration of the build path directive in Magento projects

Folders that we can remove from build path could be the following ones:

  • var: contains variables Magento data. Too much volatil, there is no real reason to include it in build path
  • media: all media elements used on your website. It should contain all picture files from your website and so there is no reason to analyse binary sources
  • skin: even if skin folder can contain js files, we can remove it
  • app/locale: for the time being, there is no link between magento translations calls and translations files. so we can also remove it
  • app/etc: like translations files, we can remove it
  • If you do not enable javascript support on your magento project, you can also remove the js folder

    How to configure build path with Zend Studio and eclipse PDT?

    On your Magento project, click right on the project and edit the build path configuration menu through the menu configure build path

    You’ll have a new window which look like this one:

    And then edit the excluded folders in list. When finished, eclipse will rebuild the build path with your new configuration

    By updating the build path, you can reduce by 30 percent number of files analyzed by eclipse. Even if you use some ssd disks, your eclipse should be faster. so if you use some slower disks or use shared networks folders, you should not forget to use this configuration value