DLTK Indexing in progress
Asked Answered
A

3

30

Our software which powers our business is nearly 16,000 PHP files long. It's an absolutely vast system. Zend Studio takes literally several hours to run the DLTK indexing.

I can't find an up-to-date response on this, but there must be a way of disabling it, or restricting it to particular directories.

Also, what exactly is this process doing?

Thanks.

Angieangil answered 12/11, 2012 at 13:56 Comment(0)
R
48

The DLTK indexing is a feature of Eclipse that indexes information about dynamic languages like PHP or Perl. For PHP, this includes class definitions including their properties and methods, function prototypes, resolves code that is included or required in other files as well as many other things.

Without it, you would lose things like autocompletion for classes and functions defined by your project. It also helps with refactoring so if you rename a function, it can update all the other files that reference that function.

It's generally a good thing but I feel your pain and have ran into the same issue a number of times.

You can prevent certain directories from being indexed by right-clicking on the folder you would like to exclude from indexing in your project and selecting Build Path and then clicking Exclude. This should prevent it from getting indexed by this process.

Exclude from build path

Alternatively, you can pull up the project properties and manage the excluded paths from there:

Exclude from build path

Remember answered 12/11, 2012 at 22:17 Comment(6)
Thank you for your response. Very helpful. I understand how important the indexing is, and it's really helpful when it's indexing our software, yet when it's indexing libraries and frameworks, it's not so helpful, as we'd never click through and edit those. Again, thanks for the detailed response on how to exclude directories.Angieangil
Additionally, it'd be useful if it could be scheduled to run at a particular point. Are you aware of any way to trigger this via command line? I could setup a scheduled task or cron to trigger it. It can be triggered by CTRL + B within eclipse/zend, but having "Build Automatically" off, and triggering at the end of the working day via ST/cron would be a perfect workaround.Angieangil
I'm not aware of any way to automate this process. It seems like it might be possible given the modular nature of eclipse but some quick searches didn't reveal any way of doing it. IRT indexing the libraries and frameworks, I suppose the only reason you'd want those indexed is if the code you write relies a lot on those libraries. Without them indexed, you won't get any autocompletion or hinting for those libraries and they would show as undefined objects in your source files that use them.Remember
An update to this, we've since upgraded our dev workstations to run on SSDs and obviously this has made a huge difference to this.Angieangil
Excellent Post with snapshots. :)Fortuna
This is the best answer I got, but I'm really moving out auto complete features and type hint, eclipse it's not fast anyway, its complete slow, when you have a long vendor "aka 15 repositories" and you type the first letter, It’s configured to show hints in 200ms! Changed to 3s. I've already tried Zend Studio, there isn't this over there! just on PDT that is FREE! What is the magic on Zend Studio?Diurnal
P
3

In case if you have multiple projects and some of them you are using very rarely you can just close the project (from right click menu): this will prevent doing DLTK indexing on those closed projects.

Please note, that closing the project does NOT remove it, so if some day you need to access or change some file you can simply re-open it.

Paederast answered 21/9, 2015 at 8:21 Comment(0)
E
1

Break out your huge code base into modules and then you can have many smaller projects in Zend Studio, each with much less to index when the dependencies are treated as libraries.

Etna answered 17/7, 2015 at 23:38 Comment(1)
I agree that a massive codebase like this one should be broken down in a way that lets you load things more modularly, but that is a long-term solution that will take a lot of time and most people in this situation need to get work for a client done immediately, even if the codebase is not well designed.Nagana

© 2022 - 2024 — McMap. All rights reserved.