Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.

File dependency scheme

Most of the advanced code tools of PHPEdit need to explore your script's dependencies to offer you usefull informations.

  • The CodeInsight needs to iterate through the dependencies to list the available classes, functions, etc...;
  • The CodeHint needs to find the function or method's declaration to show you the documentation;
  • The Jump to declaration needs to search the dependencies to find the declaration of the entity;
  • etc...

To avoid slowing down too much the application, several techniques are used to speed up this very resource expensive process:

  • Files parsed by PHPEdit are kept in memory (at least the usefull informations: classes names, functions, etc...), so they are accessed quicker for the rest of the session;
  • Files parsed by PHPEdit once are stored in a cache, so they are loaded a lot faster in the next PHPEdit session needing them;
  • PHPEdit tries to limit the number of files it searches in, using some user defined settings.

It's this last statement that we are going to explore, since the first two are done automatically and don't require any configuration. To configure how PHPEdit iterates throught the dependencies, go in the settings dialog in the "File dependencies" page:

As you can see there are several options to consider, please remember that you can configure them per-project, so you can adjust them to each of your projects to get the best performance.

Only current document

When checked, PHPEdit doesn't search for dependencies at all, and therefore will be very fast. Use this option only if you have bug performance issues, since you will miss most of PHPEdit's usefull features like CodeInsight, CodeHint, etc...

Heuristic file dependency scheme

When checked, PHPEdit will search for dependencies depending on the checked sub options:

Add opened files

PHPEdit will search through all the files opened in the editor. This search is very fast, and you can leave it checked without worrying, although it can be useless if you also checked Add project's files and all the opened files are in the project for example.

Add files from include path

If checked, PHPEdit will search in the directories indicated in Include path box, and will recurse into them depending on if these directories are checked or not.

PHPEdit maintains a cache on these directories, so even though the first search can be slow, the next ones will be very fast as the access will be done in memory.

Add project's files

If checked, and if the current document is contained in a project, PHPEdit will add all of this project's files. Depending on the size of the project this can become slow, however like for the include path, once a project has been searched once, it is kept in memory so the next searches will be a lot faster.

Add solution's files

If checked, and if the current document is contained in a project, PHPEdit will add all of this project and all of it's parent solution project's files. This can be very usefull for example if modularize your application in several projects grouped in one solution. Depending on the number of projects contained in the solution, this can become slow too, so be carefull with this setting.

Resolve dependencies

This option can be the slowest, and is unchecked by default. It is used only in addition the the 4 previous ones: if checked, every time PHPEdit finds a file in a dependency search, if will also try to find all of this file's inclusions.

For example, if your include path is like this:

P:\libs\lib1
P:\libs\lib2

and PHPEdit finds a file named P:\scripts\file1.php containing this:

<?php
include "classes/class1.php";
...

PHPEdit will do the following:

  1. Check in memory if a file named "P:\scripts\classes\class1.php" has already been found earlier;
  2. Check in memory if a file named "P:\libs\lib1\classes\class1.php" has already been found earlier;
  3. Check in memory if a file named "P:\libs\lib2\classes\class1.php" has already been found earlier;
  4. Check on disk if a file named "P:\scripts\classes\class1.php" exists;
  5. Check on disk if a file named "P:\libs\lib1\classes\class1.php" exists;
  6. Check on disk if a file named "P:\libs\lib2\classes\class1.php" exists.

As you can see this process can be very heavy, and is exponential, depending on your include path. And if the file is never found, because it isn't in any of these directories, PHPEdit will try again to find it the next time, in case you created the file in between.

If the files specified by these inclusions are in the project, or in the include path, and if you already checked Add project's files and/or Add files from include pah , then uncheck Resolve dependencies , because it will only slow things down.

On the other hand if you want to use Resolve dependencies , make sure to add the needed paths in the include path box, so that PHPEdit will find the files.