Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] swt on gtk slow


We already tried this idea for measuring only and it didn't make that much difference.  We cached the measurement of the last 64 strings. We are aware of slow string drawing and looking for ideas.

Personally, I believe that there is no single answer to this problem.  Eclipse is a large, multi-threaded Java program that really drives SWT and the rest of the Java libraries hard and the combination makes it very difficult to find one single culprit. For example, we are unable to confirm excessive slowness in StyledText outside of Eclipse.

//bugs.eclipse.org/bugs/show_bug.cgi?id=37683 is the place that is tracking these kinds of issues.  We are interested in any ideas you may have. Thanks.



Steen Jansdal <steen@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

12/15/2003 09:40 AM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [platform-swt-dev] swt on gtk slow



Bradley Schatz wrote:
> Any suggestions on how to get eclipse running as snappily as it does on
> windows when running swt/gtk?
>
> thanks
>
>

Suggestion for the SWT developers:

The editor under GTK is painfully slow and I suspect
pango is to blame for this. When drawing the editor
a lot of slow GC.drawText calls are made. Each time
a GC.drawText call are made pango has to do a slow
relayout calculation because SWT is using the same
pango layout for all GC.drawText calls. Perhaps it
would be faster to implement some kind of cache of
layouts.

For example when displaying a typical java source
file, it contains a lot of "if"'s, "while"'s, "int"'s,
equal-signs, parentheses,...
If it were possible to get a previously calculated
pango-layout of the same text and font, the drawing
would theoretically be faster. But would it be faster
than the added maintenance of the cache?

What do you think about this approach?

Steen Jansdal

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top