Graphics.drawImage() in Java is EXTREMELY slow on some computers yet much faster on others

后端 未结 7 1596
情话喂你
情话喂你 2020-12-08 08:22

I\'m having a strange problem, basically in Java Graphics.drawImage() is extremely slow on some computers and faster on others. This isn\'t related to the computers power ei

7条回答
  •  醉话见心
    2020-12-08 08:58

    There are several things that could influence performance here:

    • Available RAM
    • CPU speed
    • Graphic card (onboard or seperate)
    • Graphic driver
    • Java version
    • Used video mode (resolution, bitdepth, acceleration support)

    EDIT: Having a look at the edited question, I'd propose to check if the 9600GS system has the newest NVIDIA drivers installed. I recently installed a driver for an Intel onboard graphics card that replaced the generic Windows driver and made moving windows, watching videos, browsing etc. a lot faster.

    All the other specs look good. Perhaps Java doesn't detect the 9600GS and doesn't use hardware acceleration, but I doubt this.

    Also check the OS configuration. On Windows, you can turn off hardware acceleration for debugging purposes.

    Of course the best way to handle this would be to change your code - resize the image or split it up into chunks as DNS proposed. You'll never be able to see the whole image as it is on the screen.

提交回复
热议问题