Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [XText] Outline is slow on scrolling
[XText] Outline is slow on scrolling [message #45880] Thu, 28 May 2009 16:03 Go to next message
Dan Stefanescu is currently offline Dan StefanescuFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

Extending a node with 400 leafs and scrolling after is very slow. For
10000+ is almost unusable.
It seems there is a problem with the TreeViewer using SWT.VIRTUAL on
Windows systems.

See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=129457
https://bugs.eclipse.org/bugs/show_bug.cgi?id=200214

Is there a reason to use virtual tree viewer?

My workaround was to use a normal ITreeContentProvider and remove the
SWT.VIRTUAL.
Scrolling is nice. Creation of all content outline for 10000+ nodes is not
too slow. It seems better then the lazy implementation.

Anyway, I think we should allow the user to set or not the SWT.VIRTUAL
flag.
The problem is it's not too easy to do that without duplicating entire
classes from xtext code base.

My workaround:
1)Copy LazyTransformingTreeProvider to my sources and rename it to
TransformingTreeProvider
Implements now ITreeContentProvider, not ILazyTreeContentProvider

2)Copy XtextContentOutlinePage to my sources
Replace:

private ILazyTreeProvider provider;
with
private TransformingTreeProvider provider;

3)XtextContentOutlinePage extends LazyVirtualContentOutlinePage which
privately constructs the TreeViewer with SWT.VIRTUAL
Copy also LazyVirtualContentOutlinePage to my sources, removing the
virtual flag

A lot of code is duplicated.

I need:
1) a way to specify in LazyVirtualContentOutlinePage if VIRTUAL flag
should be used or not
2) a way to inject in XtextContentOutlinePage a
ILazyTreeProvider(implementing ILazyTreeContentProvider) or a
INotLazyTreeProvider(implementing ITreeContentProvider)

Should I post a bug to bugzilla? And maybe a patch? Will this fix(if
done), make it to 0.7.0 release?
My solution is good for xtext?

Thank you,
Dan
Re: [Xtext] Outline is slow on scrolling [message #45939 is a reply to message #45880] Thu, 28 May 2009 16:40 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Dan,

please file a bugzilla and attach a patch. Please also provide a small
testcase that illustrates the issue.

Most likely we'll do something for Xtext 0.7.0 to improve the overall
experience with the outline.

Thanks in advance,
Sebastian

Am 28.05.2009 18:03 Uhr, schrieb Dan Stefanescu:
> Hello,
>
> Extending a node with 400 leafs and scrolling after is very slow. For
> 10000+ is almost unusable.
> It seems there is a problem with the TreeViewer using SWT.VIRTUAL on
> Windows systems.
>
> See:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=129457
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=200214
>
> Is there a reason to use virtual tree viewer?
>
> My workaround was to use a normal ITreeContentProvider and remove the
> SWT.VIRTUAL.
> Scrolling is nice. Creation of all content outline for 10000+ nodes is
> not too slow. It seems better then the lazy implementation.
>
> Anyway, I think we should allow the user to set or not the SWT.VIRTUAL
> flag.
> The problem is it's not too easy to do that without duplicating entire
> classes from xtext code base.
>
> My workaround:
> 1)Copy LazyTransformingTreeProvider to my sources and rename it to
> TransformingTreeProvider
> Implements now ITreeContentProvider, not ILazyTreeContentProvider
>
> 2)Copy XtextContentOutlinePage to my sources
> Replace:
>
> private ILazyTreeProvider provider;
> with private TransformingTreeProvider provider;
> 3)XtextContentOutlinePage extends LazyVirtualContentOutlinePage which
> privately constructs the TreeViewer with SWT.VIRTUAL
> Copy also LazyVirtualContentOutlinePage to my sources, removing the
> virtual flag
>
> A lot of code is duplicated.
>
> I need:
> 1) a way to specify in LazyVirtualContentOutlinePage if VIRTUAL flag
> should be used or not
> 2) a way to inject in XtextContentOutlinePage a
> ILazyTreeProvider(implementing ILazyTreeContentProvider) or a
> INotLazyTreeProvider(implementing ITreeContentProvider)
>
> Should I post a bug to bugzilla? And maybe a patch? Will this fix(if
> done), make it to 0.7.0 release?
> My solution is good for xtext?
>
> Thank you,
> Dan
>
>
>
>
>
Re: [Xtext] Outline is slow on scrolling [message #45969 is a reply to message #45939] Thu, 28 May 2009 19:35 Go to previous message
Dan Stefanescu is currently offline Dan StefanescuFriend
Messages: 2
Registered: July 2009
Junior Member
Bug is ready:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278270

Thank you,
Dan

Sebastian Zarnekow wrote:
> Hi Dan,
>
> please file a bugzilla and attach a patch. Please also provide a small
> testcase that illustrates the issue.
>
> Most likely we'll do something for Xtext 0.7.0 to improve the overall
> experience with the outline.
>
> Thanks in advance,
> Sebastian
>
Previous Topic:[XText] a standalone Java application that parses text to model
Next Topic:from BNF to metamodel
Goto Forum:
  


Current Time: Tue Jan 28 15:16:55 GMT 2025

Powered by FUDForum. Page generated in 0.03188 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top