Graphics2D.drawPolyline performance on JDK 8 vs. JDK 11 (repost)

dalibor topic dalibor.topic at oracle.com
Tue Oct 9 10:10:17 UTC 2018



On 09.10.2018 11:00, Peter Hull wrote:
> I've recently started using Java 11 and noticed that drawPolyline is
> much slower on my PC than it was on Java 8.
> Example, simplified code:
>      @Override
>      protected void paintComponent(Graphics g) {
>          super.paintComponent(g);
>          Graphics2D graphics = (Graphics2D) g;
>          long starttime = System.nanoTime();
>          graphics.drawPolyline(xs, ys, xs.length);
>          long endtime = System.nanoTime();
>          Logger.getLogger(this.getClass().getName()).log(Level.INFO,
> "Paint Time: {0}s", (double)(endtime-starttime) / 1.0e9);
>      }
> where xs[] and ys[] are large (65536 points) integer arrays. On
> OpenJDK8_x64_Win_jdk8u172-b11 I get a paint time of 0.025s and on
> openjdk-11+28_windows-x64 it is 25s, i.e. factor of 1000.
> This may be related to JEP263 (HiDPI)
> 
> I've got a recent Core i7 processor with Intel graphics, running Windows 10.
> 
> Is this a bug do you think and if so, where to report it?

Hi,

please file an issue on bugs.java.com.

cheers,
dalibor topic

-- 
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>

ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher

<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment


More information about the discuss mailing list