Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] JDT index maintenance guide

> - If you can add a test infrastructure that will do the search operation both in the old and new indexer and then does a comparison that would serve as a fast check for new feature adoption.
> Let the infrastructure be generic, and you can add tests which uses the new indexer and then compare with the old indexer operations. The same can be documented here as well [JDT Developer's guide]

I never adopted the index in SearchEngine so I can't do this for searches yet. However, I've already implemented something like this for the index-as-a-type-cache feature. If you enable the following trace option, the indexer will read back every type it writes to the index and compare it with the original:

org.eclipse.jdt.core/debug/index/selftest=true

...which validates that there is no externally-visible difference whether that type was read from the index or from disk.

I'm not sure I'll have time to implement this, but it would also be possible to do something for type hierarchies. If you look at the implementation of IndexBasedHierarchyBuilder.searchAllPossibleSubTypes, you'll see that there's two branches separated by a call to JavaIndex.isEnabled(). Rather than running one-branch-or-the-other, you could run both and compare their results.


On Thu, Apr 27, 2017 at 4:55 PM, Manoj Palat <manoj.palat@xxxxxxxxxx> wrote:

Hi Stefan,

- I second that. This would help speed up the new index work.

- If you can add a test infrastructure that will do the search operation both in the old and new indexer and then does a comparison that would serve as a fast check for new feature adoption. Let the infrastructure be generic, and you can add tests which uses the new indexer and then compare with the old indexer operations. The same can be documented here as well [JDT Developer's guide]

Regards,
Manoj
Inactive hide details for Lars Vogel ---04/28/2017 04:38:28 AM---Hi Stefan, A section about "how to adapt the new index" would Lars Vogel ---04/28/2017 04:38:28 AM---Hi Stefan, A section about "how to adapt the new index" would be nice.

From: Lars Vogel <lars.vogel@xxxxxxxxxxx>
To: "Eclipse JDT Core developers list." <jdt-core-dev@xxxxxxxxxxx>
Date: 04/28/2017 04:38 AM
Subject: Re: [jdt-core-dev] JDT index maintenance guide
Sent by: jdt-core-dev-bounces@eclipse.org





Hi Stefan,

A section about "how to adapt the new index" would be nice.

Best regards, Lars

Am 28.04.2017 1:05 vorm. schrieb "Stefan Xenos" <sxenos@xxxxxxxxxx>:


_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev


Back to the top