Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT Performance suggestion

Chris,
      Thanks, yes I had seen this API, and I've been toying with the idea,
I agree it will probably be fastest. I'm not entirely sure what the client
is going to be, although they are going to be >98% windows can I expect a
working OpenGL interface?

      I'm going to write the batching benchmark as Randy suggested and then
benchmark against OpenGL, I'll publish here when I have the numbers.

      It may sound like I'm being silly about the performance but It will
probably an issue when the line count goes up, and it's a bit of a passion
of mine :-)

Paul Anderson
IBM Systems and Technology Group Lab Services

Try Gentoo Linux (www.gentoo.org)


|---------+------------------------------------>
|         |           Christophe Cornu         |
|         |           <Christophe_Cornu@xxxxxx.|
|         |           com>                     |
|         |           Sent by:                 |
|         |           platform-swt-dev-bounces@|
|         |           eclipse.org              |
|         |                                    |
|         |                                    |
|         |           01/03/2007 06:16 PM      |
|         |           Please respond to        |
|         |           "Eclipse Platform SWT    |
|         |           component developers     |
|         |           list."                   |
|---------+------------------------------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                                  |
  |       To:       "Eclipse Platform SWT component developers list." <platform-swt-dev@xxxxxxxxxxx>                                                 |
  |       cc:                                                                                                                                        |
  |       Subject:  Re: [platform-swt-dev] SWT Performance suggestion                                                                                |
  |                                                                                                                                                  |
  |                                                                                                                                                  |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|




Hi Paul,

Another possible area to explore is through the Open GL binding.
http://www.eclipse.org/swt/opengl/
If your client is power hungry for frame rates and low level graphics, this
might be a good way to leverage today's video cards true potential.

Chris

Thursday, December 28, 2006 7:25 PM
To: "Eclipse Platform SWT component developers list."
<platform-swt-dev@xxxxxxxxxxx>
cc: "Eclipse Platform SWT component developers list."
<platform-swt-dev@xxxxxxxxxxx>, platform-swt-dev-bounces@xxxxxxxxxxx
From: Paul Anderson <paul-anderson@xxxxxxxxxx>
Subject: Re: [platform-swt-dev] SWT Performance suggestion


Randy,
"Clicks" for calling me on the Million drawLines, my expectation is
~10,000 per frame but I want a fairly high frame rate. As I work in Java
perfomance the lock/unlock looked like an obvious target.

      Although the data set I wish to draw will often contain over 400M
      lines there are clearly optimisations around scale and visibility
that can
      be exploited, these given, I wish to be confident that I can deliver
the
      end user experience required.

      I have been playing with the often referenced SWT/RCP based
      applications, i.e. Azureus, and found the SWT/Cairo/XGL performance
      generally excellent, however on the  Azureus
Tools->Statistics->Vivaldi
      canvas the draw speed seemed to be ~500ms, my guess is that a
drawList
      would drop this to <100ms.

      I'll go off and write a drawList function and time the difference, if
      it is pretty for my case and a few others then maybe SWT could
consider
      inclusion.



Paul Anderson
IBM Systems and Technology Group
Client Technology Center for Lab Services
EMEA ATS e-Business Solutions Center (eBSC),  Netherlands
Home Office:+31-20-513-7388, Home Office:+31-70-362-9501,
Mobile:+31-651788098, paul-anderson@xxxxxxxxxx

internet: www.ibm.com/eserver/services
intranet: w3is.lge.fr.ibm.com/eBSC/CTC, web.mainz.de.ibm.com/ATSservices

Try Gentoo Linux (www.gentoo.org)


|---------+------------------------------------>
|         |           Randy Hudson             |
|         |           <hudsonr@xxxxxxxxxx>     |
|         |           Sent by:                 |
|         |           platform-swt-dev-bounces@|
|         |           eclipse.org              |
|         |                                    |
|         |                                    |
|         |           12/28/2006 06:08 PM      |
|         |           Please respond to        |
|         |           "Eclipse Platform SWT    |
|         |           component developers     |
|         |           list."                   |
|---------+------------------------------------>

>--------------------------------------------------------------------------------------------------------------------------------------------------|

  |
  |
  |       To:       "Eclipse Platform SWT component developers list."
  <platform-swt-dev@xxxxxxxxxxx>
  |
  |       cc:
  |
  |       Subject:  Re: [platform-swt-dev] SWT Performance suggestion
  |
  |
  |
  |
  |

>--------------------------------------------------------------------------------------------------------------------------------------------------|




In most cases a Canvas doesn't even have 1 million visible pixels.  So
drawing as many lines probably isn't what you want to do. But, without
knowing exactly what you are doing, I am only guessing that there are some
optimizations potentially available at the client.  There are
caching/update strategies if you can't avoid painting so many lines.

Avoiding significant amounts of native code was an original design goal of
SWT.  It was pretty much "the law".  I believe this restriction has some
exceptions, perhaps for loading JPGs or something.  I don't velieve JNI was
the gating factor in those cases. Anyway, adding some more "meaty" native
methods that *duplicate* (ok, aggregate) existing API would probably be
taking SWT into uncharted territory.

You might want to open a bugzilla at this point to discuss both the
problem/possible solution, but also available workarounds (perhaps check
the newsgroups for this too).

-Randy Hudson




             Paul Anderson
             <paul-anderson@nl
             .ibm.com>                                                  To
                                       "Eclipse Platform SWT component
                                       12/28/2006 11:06          developers
             list."
                                       AM
             <platform-swt-dev@xxxxxxxxxxx>
                                                                        cc

Randy
 Hudson/Raleigh/IBM@IBMUS
                                                                   Subject
                                                                   Re:
                                       [platform-swt-dev] SWT

Performance
 suggestion










Randy,
I agree, explicit end user locking could be cleaner/easier, I'm sure
it could be given a sufficient enough health warning to make people aware
of the dangers. In my particular case I would still pay 1,000,000 x the JNI
costs.

Paul Anderson
IBM Systems and Technology Group Lab Services
Home Office:+31-20-513-7388, Home Office:+31-70-362-9501,
Mobile:+31-651788098, paul-anderson@xxxxxxxxxx

Try Gentoo Linux (www.gentoo.org)


|---------+------------------------------------>
|         |           Randy Hudson             |
|         |           <hudsonr@xxxxxxxxxx>     |
|         |           Sent by:                 |
|         |           platform-swt-dev-bounces@|
|         |           eclipse.org              |
|         |                                    |
|         |                                    |
|         |           12/28/2006 04:52 PM      |
|         |           Please respond to        |
|         |           "Eclipse Platform SWT    |
|         |           component developers     |
|         |           list."                   |
|---------+------------------------------------>

>--------------------------------------------------------------------------------------------------------------------------------------------------|



  |
  |
  |       To:       "Eclipse Platform SWT component developers list."
  <platform-swt-dev@xxxxxxxxxxx>
  |
  |       cc:
  |
  |       Subject:  Re: [platform-swt-dev] SWT Performance suggestion
  |
  |
  |
  |
  |

>--------------------------------------------------------------------------------------------------------------------------------------------------|






It would be ideal if everyone could benefit from better lock/unlock
strategy without moving to some new API. Perhaps some creative, lazy unlock
approach might help?
Or, maybe adding API GC.lock() and GC.unlock(), and continue using all of
the existing calls?

-Randy




             Paul Anderson
             <paul-anderson@nl
             .ibm.com>                                                  To
             Sent by:                  platform-swt-dev@xxxxxxxxxxx
             platform-swt-dev-                                          cc
             bounces@eclipse.o
             rg                                                    Subject
                                       [platform-swt-dev] SWT Performance
                                       suggestion
             12/28/2006 09:41
             AM


             Please respond to
             "Eclipse Platform
               SWT component
               developers list."
               <platform-swt-dev
               @eclipse.org>







Hi All,
I'm embarking on creating a graphical tool and have chosen to base it
on SWT, performance will be very important as the display may contain up to
a million lines. In my early experimentation I profiled some code and
noticed that before and after each native call to a graphic primitive such
as _gdk_draw_line there is a Lock.lock and Lock.unlock.

      Would it be possible to add to SWT a new drawing method that allows
      me to construct an array of ints that represent a list of drawing
      instructions that are sent in there entirety down to the native code
for
      execution, therefore eliminating the repeated thunking, locks/unlocks
and
      JNI round trips, there maybe also efficiencies to be had in the
native
      code. For example:



                  int[] drawList = new int[19];
                  int index=0;

                  drawlist[index++] = SWT.DRAW_LINE;
                  drawlist[index++] = 0;
                  drawlist[index++] = 0;
                  drawlist[index++] = 100;
                  drawlist[index++] = 100;
                  drawlist[index++] = SWT.SET_FOREGROUND;
                  drawlist[index++] = 255;
                  drawlist[index++] = 255;
                  drawlist[index++] = 255;
                  drawlist[index++] = SWT.DRAW_LINE;
                  drawlist[index++] = 0;
                  drawlist[index++] = 100;
                  drawlist[index++] = 100;
                  drawlist[index++] = 0;
                  drawlist[index++] = SWT.DRAW_LINE;
                  drawlist[index++] = 100;
                  drawlist[index++] = 100;
                  drawlist[index++] = 0;
                  drawlist[index++] = 100;


                  GC.drawList(drawList);



Paul Anderson
IBM Systems and Technology Group Lab Services
Home Office:+31-20-513-7388, Home Office:+31-70-362-9501,
Mobile:+31-651788098, paul-anderson@xxxxxxxxxx

Try Gentoo Linux (www.gentoo.org)

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


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




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


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

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




Back to the top