26

I am using Eclipse PDT Helios with Aptana Studio on Windows XP SP3. Very often, my workflow is interrupted because Eclipse starts a DLTK indexing process that lasts 30 seconds, sometimes up to 2 minutes - which is annoying.

I wonder if there is any way to:

  • Either turn that off or
  • Run the DLTK indexing process less frequently.

I didn't find any possibility to change regarding parameters in Window > Preferences.

Mateng
  • 3,742
  • 5
  • 37
  • 64

3 Answers3

36

PDT 2.2 (the one in Helios) is using a local database engine, H2, to store information. I wrote a post highlighting how to improve the performance of the new indexer.

There might be another way, but it's requires hacking and I haven't tried it myself since the early builds of PDT 2.2 so YMMV: use a newer version of H2. You see, PDT 2.2 uses H2 version 1.1.117. The current version is 1.2.140. Basically, it involves downloading a newer version from the h2 site, and replacing the current H2 JAR in the plugins folder with this Jar. I should really write a blog post about it. I just need to find some time...

zvikico
  • 9,765
  • 4
  • 38
  • 49
  • Impressive. Much more detailed than my general answer. +1 – VonC Aug 05 '10 at 14:42
  • Well, the inspiration for using H2 in PDT 2.2 came from nWire, so we have some insights to share about using it... – zvikico Aug 05 '10 at 16:04
  • Any hints on how to replace my 1.1.117 H2 plugin? In my plugins folder C:\Program Files\Eclipse\plugins I can find: "org.h2_1.1.117.v20091003-1000.jar" and "org.eclipse.dltk.core.index.sql.h2_2.0.0.v20100616-2015.jar". From the h2 site, I can download: "h2-1.2.140.jar" – Mateng Aug 06 '10 at 09:38
  • 2
    Don't touch the dltk JAR. For the H2, it should be a simple file replacement. Take out the old, bring in the new. Don't forget to start with -clear and check your About→...→Config (or OSGi console) to see if Eclipse took it well. If this doesn't work, try renaming the new one and giving it the name of the old one. – zvikico Aug 06 '10 at 14:02
  • Has anyone successfully done this? I tried it and it didn't seem to work. I installed the new h2 jar, and the dltk indexer did its thing, but using "Open Declaration" in PHP files no longer worked. – Russell Davis Jan 11 '11 at 23:57
  • i manage to replace my h2 jar with the latest from the website. I renmaed the website one and replaced the one in plugins directory, as well as deleting all the database files from workspace/.metadata\.plugins\org.eclipse.dltk.core.index.sql.h2 eclipse 3.6 / pdt 3 – Ben K Aug 10 '12 at 07:01
  • I was successful too, thanks. What Eclipse plugin determines that version 117 is installed? Is anyone in the Eclipse community considering to update the default version? – Jorrit Schippers Aug 31 '12 at 16:26
  • 1
    Deleting the .db files and letting them rebuild fixed everything for me. Rebuild of a large Symfony2 project took less than 2 seconds. Thanks for a terrific article! – dnagirl Jan 29 '15 at 18:58
  • 1
    @rineez: as stated in the linked article in the above answer "•For PDT: `/.metadata/.plugins/org.eclipse.dltk.core.index.sql.h2/ `" – dnagirl Apr 30 '15 at 14:37
  • nwiresoftware.com link returns 503 Service Unavailable. – Genjo Oct 02 '17 at 08:24
6

I also have/had this problem and turned off "Build Automatically" in the projects menu. Which seems to have resolved the problem for me...

So question is, and please excuse my ignorance here... but what is "Build" required for in PHP world.

MarkOfSine
  • 275
  • 3
  • 11
  • 7
    IIRC, in terms of deploying a php app "Build" means nothing. But in the context of Eclipse, it what indexes your code to make all the code inspection features work. – D-Rock May 18 '12 at 12:42
1

There are some issue currently being worked out with the dltk.core.index process:

See bug 319130 from yesterday (August 4th).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250