Bug 77328 - Check help index on startup
Summary: Check help index on startup
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.1 M6   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2004-10-29 16:14 EDT by Mike Beltzner CLA
Modified: 2005-04-04 13:04 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Beltzner CLA 2004-10-29 16:14:13 EDT
A consistent complaint with the Eclipse Help system is that it can take a long
time to build the first search index (especially when many plugins are
installed), which is a particular pain because it is only kicked off after a
user has indicated he wishes to search for something.

I'm wondering if we can check for the help index on startup. If index DNE or if
new plugins have been installed, the indexing process is started as a
non-blocking thread. If a user attempts a search while the index process is
still running in background, the help system can present a message (similar to
what exists now) informing a user that they must wait for indexing to complete,
and presenting a progress bar (which can get current progress status from the
monitor watching the non-blocking index process).

In 99% of the cases, the indexing will complete while someone's looking through
the welcome perspective or building their first project, and be ready by the
time they actually want to run a search. Really easy win in terms of usability.
Comment 1 Konrad Kolosowski CLA 2004-10-31 04:01:34 EST
Yes.  We were thinking about it, since Eclipse added jobs support in 3.0.
In the mean time a product can ship prebuilt help index which will speed up 
indexing after initial installation.
Comment 2 Mike Beltzner CLA 2004-11-22 13:27:12 EST
In many uses of Eclipse, the documentation plugins installed depend on which
components are installed, making a pre-built index near impossible to do (as I
understand things).

Glad to know you're considering this support, as it would really help.
Comment 3 Dejan Glozic CLA 2005-02-01 14:18:17 EST
We should definitely consider this for 3.1. Help view already kicks the 
indexer when opened, so we already have the model implementation as a 
background job. All we need to do is expand it to other areas of help 
(Help>Help Contents menu item etc.).
Comment 4 Mike Beltzner CLA 2005-02-01 18:17:24 EST
Dejan, is that new in the 3.1 milestone builds? The 3.0.1 driver (just
downloaded and tested) doesn't kick off the indexing until a user opens help and
attempts a search ...
Comment 5 Dejan Glozic CLA 2005-02-01 18:22:36 EST
This is the new function appearing in today's integration build and only when 
opening the new Help view (for now, press F1 anywhere in the workbench 
window). 

Again, we cannot start the indexer on the very startup because that would be 
not be in the spirit of Eclipse to use lazy loading as much as possible. 
However, starting the indexer when any of the help actions is invoked seems 
fair.
Comment 6 Mike Beltzner CLA 2005-02-01 18:44:24 EST
Cool! I see your point about lazy-loading. Could we still provide a mechanism
for the indexer to be called by a product *built* on Eclipse (no names, no names
;)) which might make the product-level decision to have that indexer called on
first startup in order to ensure that users have a zero-wait time if they want
to do a help search? 
Comment 7 Dejan Glozic CLA 2005-02-01 20:01:11 EST
Eclipse Help system is just the default implementation of the 
AbstractHelpSystem class. Therefore, you don't really call Eclipse help 
system, you talk to Platform UI proxy and it delegates the call to the active 
help system that implements AbstractHelpSystem class.

In order for this to work, we would need to add a new method, something like:

ensureSearchIndexed();

The method would immediately exit if no indexing is needed. Otherwise, it 
would start indexer in a background job.
Comment 8 Dorian Birsan CLA 2005-02-02 08:58:54 EST
Dejan, that method exposes the internals of help. Indexing is just an artifact 
of doing a (waaaay faster) search. I suggest we provide a search API, that in 
turns triggers a background indexing.
A product can search for a something, just to kick things off.
If this looks too hackerish, than an init() method should do it.
Comment 9 Dejan Glozic CLA 2005-02-02 10:08:06 EST
Although it is true that indexing is internal artifact of Lucene, virtually 
every search engine must use it in order to perform well. I think that your 
suggestion to name the method 'init' is very good - it is general enough and 
would cover indexing and anything else that a help system would need to run.
Comment 10 Mike Beltzner CLA 2005-02-02 11:43:39 EST
So do we need to close this bug and open a new one with the requirements listed
above? That is to say a small search API added to the platform UI proxy which
includes an init() method that will ensure that the system is indexed and ready
for search?

Then applications based on Eclipse can simply call that init() method using
their their own criteria in order to decide when they'd want to do that.
Comment 11 Dejan Glozic CLA 2005-02-02 11:48:55 EST
The only feature request from this discussion would be addition of 'init' 
method on IHelpSystem and AbstractHelpSystem classes, AbstractHelpSystem would 
provide default (empty) implementation for backward compatibility.
Comment 12 Mike Beltzner CLA 2005-02-02 12:16:09 EST
OK, renamed so that the bug title better reflects the request. :)
Comment 13 Dejan Glozic CLA 2005-02-21 16:22:11 EST
Due to the complexity of checking the index for an ISV and the requirement to 
NOT use the existing calls in org.eclipse.help.base plug-in, we are going to 
provide the startup plug-in ourselves. This defect will be used to track this 
new feature.

The proposal is to create a new optional RCP plug-in 
(org.eclipse.help.indexer) that would check the relevant configuration files 
and start a background job if indexing is needed. The plug-in will prereq 
org.eclipse.help.base but it will only create classes from it if indexing is 
required. The goal is to perform a quick I/O check and exit if no indexing is 
needed. If indexing IS needed, we will create IndexerJob, schedule it and 
exit. Either way, the actual indexing will be performed by the background job 
whose progress can be monitored as with any other job. This same job is 
created when HelpView is opened, so checks will be performed to avoid 
duplication.

The name of the new plug-in will be : 

org.eclipse.help.indexer

It will have a 'startup' extension that will case the execution on workbench 
startup. It will not really perform the indexing (org.eclipse.help.base does 
that) but we don't want to create a verbose plug-in name for the sake of 
exactness.

Comment 14 Dejan Glozic CLA 2005-04-04 13:04:16 EDT
We have decided to drop this idea and instead go with the prebuit index per 
plug-in. The overhead of building an index in the background thread on startup 
may be too much on some platforms (on Linux GTK, priority is not given to the 
GUI thread so the apparent performance may be bad for several minutes).

See bug 57455 for more information on prebuilt indexes.