• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: drawImage() really slow on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawImage() really slow on Leopard


  • Subject: Re: drawImage() really slow on Leopard
  • From: Miguel Arroz <email@hidden>
  • Date: Wed, 27 Feb 2008 01:44:35 +0000

Hi!

But is it normal that it takes 1000x times more? This worries me because the server where I'll deploy will run FreeBSD, so it does NOT have Quartz below to do this kind of work... I know Quartz is amazing, but it's a little hard to accept that Sun2D is this bad. There must be a bug of some sort here... right?

  We'll do some FreeBSD performance tests on this ASAP.

  Yours

Miguel Arroz

On 2008/02/27, at 01:11, Galen Rhodes wrote:

Yes, they switched from the Quartz rendering pipeline to the Sun rendering pipeline and the performance sucks. I've already posted a bug report to Apple about it.

In the meantime switch to the Quartz rendereing pipeline with the following command line switch:

	-Dapple.awt.graphics.UseQuartz=true

--
Galen Rhodes
email@hidden
http://www.photoyoda.com
http://www.myspace.com/woexpert




On Feb 26, 2008, at 7:37 PM, Miguel Arroz wrote:

Hi!

I have the following code to downscale images:

// Do the scaling
BufferedImage reducedImage = new BufferedImage(newX, newY, BufferedImage.TYPE_INT_RGB);
Graphics2D g = reducedImage.createGraphics();
g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_SPEED);

NSLog.out.appendln("Drawing image with original dimensions " + originalImage.getWidth() + ", " + originalImage.getHeight()
+ " with size " + newX + ", " + newY ); */

g.drawImage(originalImage, 0, 0, newX, newY, 0, 0, originalImage.getWidth(), originalImage.getHeight(), null);
g.dispose();


The log is: INFO 00:27:16 (NSLog :38) -Drawing image with original dimensions 3072, 2304 with size 267, 200

This took about a second to process in my Powerbook on Tiger. I migrated to Leopard, and this is taking... well... forever. I waited several minutes and it's still sucking up my CPU. Shark says it's taking a lot of time in color conversion stuff:

<pastedGraphic.png>

I have no ideia why. It's the same image and the same code. Only the OS has changed. Another Leopard bug?

Any ideias?

Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


Miguel Arroz http://www.terminalapp.net http://www.ipragma.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: drawImage() really slow on Leopard
      • From: Galen Rhodes <email@hidden>
References: 
 >drawImage() really slow on Leopard (From: Miguel Arroz <email@hidden>)
 >Re: drawImage() really slow on Leopard (From: Galen Rhodes <email@hidden>)

  • Prev by Date: Perfect Web App IDE=Eclipse+Netbeans+Others?
  • Next by Date: Re: drawImage() really slow on Leopard
  • Previous by thread: Re: drawImage() really slow on Leopard
  • Next by thread: Re: drawImage() really slow on Leopard
  • Index(es):
    • Date
    • Thread