Bug 87416 - getClipping() slower since 3.0
Summary: getClipping() slower since 3.0
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bogdan Gheorghe CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-03-08 13:48 EST by Tod Creasey CLA
Modified: 2013-12-18 09:05 EST (History)
5 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2005-03-16 23:37 EST, Billy Biggs CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2005-03-08 13:48:37 EST
The performance tests in SWT show a slowdown of 66% on Windows and 100% on GTK.
Billy said that this was because the test was not reasonable for comparing
against  3.0 and needs updating.
Comment 1 Veronika Irvine CLA 2005-03-08 16:03:27 EST
Grant and Silenio,

Can you look at these tests and decide what is reasonable?

Thank you,
Veronika
Comment 2 Billy Biggs CLA 2005-03-08 16:15:31 EST
Tod, which build showed these and which tests in particular?

Going from N20050307-0010 I see the following GC tests stand out:

Windows
  - GC.setLineWidth()  -70%

GTK+
  - new GC(Drawable)   -70%,-100%
  - GC.getClipping     -195%
  - GC.copyArea        -100%
  - GC.drawImage       -100%

GC.drawImage() and GC.copyArea() on Linux are completing in less than 200
milliseconds each, and the times are highly variable.  These results are noise
and maybe the tests should be removed or fixed.
Comment 3 Tod Creasey CLA 2005-03-09 08:58:54 EST
This is the build I saw the issues in too.
Comment 4 Billy Biggs CLA 2005-03-16 23:37:17 EST
Created attachment 18889 [details]
Patch

GC.getClipping() became slower in revision 1.67 which added the damage region. 
The extra cost is from creating a new region which we just use to get the
bounding box.  This patch optimizes this case.
Comment 5 Billy Biggs CLA 2005-03-17 00:08:24 EST
I am finding it difficult to explain the change for the new GC(Drawable)
benchmark.  Besides the locking changes, the only addition of code is that we
now set data.background and data.foreground in Image.internal_new_GC() and that
we call pango_context_set_base_dir() in GC.init().  Neither of these changes
seem to make much difference in performance here though.
Comment 6 Billy Biggs CLA 2005-04-05 16:15:53 EDT
Reassigning to me and changing the subject to reflect what came out of this.
Comment 7 Silenio Quarti CLA 2006-08-02 09:56:31 EDT
Note that this may be fixed already.
Comment 8 Alexander Kurtakov CLA 2013-12-18 09:05:30 EST
Closing the bug as this is against very old swt release and too many underlying things changed since then. Please open a separate bug report if you have measurable slow down with 4.3.