I have found the CPU-consumption performance problem reported by Nico.

I have not yet checked in the bug fix ... it is a simple change, but I
want to figure out how to do it without losing some functionality.

The problem has to do with use of the 'alpha channel' when the image is
constructed. This change caused additional CPU processing when the image
is blitted to the screen.

I introduced the problem in response to a request for additional
functionality. Charles (of the Concord Group) asked for a translucent
background so that they could take Jmol images and overlay them on top of
other images. He sent me some sample code and showed me that it was a
simple change to the image color model. It was an easy change. I
introduced 'color background translucent' as a script command so that he
could control it.

The old code was creating the image with a 24-bit RGB color model. With a
24-bit color model the RGB values are taken directly and applied. There is
no such thing as the 'alpha' channel for translucency.

The 32-bit ARGB color uses another byte to determine the level of
translucency. We always set the transluceny to either 0 (transparent) or
255 (fully opaque).

When a 32-bit ARGB image is painted then the alpha channel value must be
tested. This is consuming quite a bit more CPU than I expected ... and I
should have known better.

Clearly I should have done some performance impact testing before
introducing the change. I apologize for wasting people's time on this.


At this point, I need to think about the best/easiest way for us to allow
the 'color background translucent' functionality without paying the
performance penalty unless it is actually used.


Charles, Please confirm that your group is actually using this functionality.


Miguel



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to