[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[platform-team-dev] Problem with decorator performance
|
Hello
everybody,
I'm new to this
list, and I hope this is the right place to get advice :-)
Recently I joined
the dev team for the Eclipse ClearCase team provider http://sourceforge.net/projects/eclipse-ccase/,
mainly to improve the really bad performance of this provider. ClearCase access
is really slow on some platforms. We improved a lot already, but
there is one major problem where I'm stuck:
When a project gets
associated with ClearCase (this is done manually via a menu entry), I want the
CC decorators to get activated. Basically I do a LabelProviderChangedEvent for all the resources in the project. This is
taken almost directly from the CVS code:
public
void refresh(IProject project) {
final List<IResource>
resources = new ArrayList<IResource>();
try
{
project.accept(new IResourceVisitor()
{
public boolean visit(IResource resource)
{
resources.add(resource);
return
true;
}
});
fireLabelProviderChanged(new
LabelProviderChangedEvent(this, resources.toArray()));
}
catch (CoreException e)
{
handleException(e);
}
}
In turn, the
platform calls the decorate() for every resource. In the decorate() method, I
ask ClearCase for the file state (checkd in/out, private etc...) which takes
around 50ms, and then I decorate the icon correspondingly. Additionally, that CC
state information is cached, to speed up later processing.
The problem
shows with projects of several thousnad files and folders, which is quite common
for CC users. It takes several minutes (one user reported 20min) until the
decorators show. That is clearly unacceptable. ("...One of our projects has
currently about 17000 Files in 2000 folders (90 folders in the first project
level).The fist association process takes about 15 to 20 minutes...")
Even worse: There is
no sign to the user when this process has finished or what's going on at all. To
improve the user experience, I am gathering the CC state in advance now and fill
the cache, shown with a progress monitor. That doesn't make it any faster, but
at least the user knows what's going on.
I'm searching for a
way to ask the platform to update only the labels for elements that are
currently shown in the UI. If, for example, a project is opened and
only the first level of folders is currently shown in the package explorer, only
these labels should be refreshed during the associate action. Then, whenever
another folder is opened by the user, the contained elements should update their
labels. (I hope that's clear? English is not my native
language)
That way the delay
for the CC operations would be almost unnoticable.
Is there any way to
achieve this? Any help or pointer are greatly appreciated.
Thanks.
Achim