Community
Participate
Working Groups
+++ This bug was initially created as a clone of Bug #350850 +++ When searching Eclipse Help for the first time, a search index has to be built. The speed of doing so can be drastically improved when the doc plugin ships a prebuilt help index. Egit doc should include such an index, such that users can search docs faster. I'm not sure how to integrate the index builder with the maven/tycho build system used by egit, but for reference the attachment on bug 350850 shows how this is done with PDE Build - it's pretty easy.
Initial support for building the index with PDE Build has been submitted to Gerrit: http://egit.eclipse.org/r/#q,Ie438e5a642eaf1e50c9482898822bc5376cbe377,n,z Support for Tycho will need to be added.
Gees, there was Hudson test failures with this change, but I can't possibly understand how these could be related to this change. Would appreciate some human reviewer.
Unfortunately, AFAIK only the Eclipse ant support (embedded in Eclipse) can build the help index. But Eclipse antRunner can be launched from the outside, and since an Eclipse Target Platform must be available when Tycho is running, executing the following command from inside Tycho should do the trick (the extra -D options enable some logging): java -jar $ECLIPSE_HOME/plugins/org.eclipse.equinox.launcher_*.jar \ -data /tmp/tmpws \ -configuration /tmp/tmpconfig \ -DjavacDebugInfo=on \ -DjavacVerbose=true \ -DjavacFailOnError=false \ -application org.eclipse.ant.core.antRunner \ -f customBuildCallbacks.xml \ build.index I'm not sure how to invoke the external Java from Tycho, or whether perhaps an Eclipse instance inside the JVM could be launched, but the concept is clear and we actually use the same command successfully in our own proprietary build (invoked from a Shell / Makefile in our case).
I should also mention that the format of the prebuilt index files changed with Eclipse 3.7 (due to the new Lucene version). So when building the prebuilt index, one needs to decide whether an Eclipse 3.7 is used (for 3.7 consumers) or an older Eclipse (for older Eclipse consumers). Having an old version of help index means that Eclipse 3.7 cannot use the index and silently re-builds it on first search (thus there is a performance hit again). I never checked what happens when having a new version of help index in an older Eclipse - that would be easy to check by placing an Eclipse 3.7 platform.doc.user plugin into an Eclipse 3.6 or 3.5 dropins folder, launching and performing a help search.