Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Phil Race
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). 1) This is un-necessary churn. 2) I can't

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Jonathan Gibbons
On Thu, 10 Sep 2020 12:04:48 GMT, Dmitriy Dumanskiy wrote: > I have in mind dozens of improvements all over the code like this one. That sounds scary. Broad updates like these cause unnecessary churn in the codebase, and can make merging and back porting harder. Changes should be discussed ah

[OpenJDK 2D-Dev] RFR: 8252070: Some platform-specific BLIT optimizations are not effective

2020-09-10 Thread Sergey Bylokhov
Some of our code assumes that the native system(XRender, D3D, OGL) makes some effective optimizations, but in some cases, we can do better. One of the areas for improvement is direct blitting. If the source is much bigger than the destination we should not try to copy to the non-existent area and

[OpenJDK 2D-Dev] Integrated: 8171303: sun/java2d/pipe/InterpolationQualityTest.java fails on Windows & Linux

2020-09-10 Thread Sergey Bylokhov
On Tue, 8 Sep 2020 21:54:43 GMT, Sergey Bylokhov wrote: > This the only test which was created to check different types of > interpolation. > It checks the rendering to the VolatileImage and uses BufferedImage as a gold > image. > But it does not take into account that rendering to the Volatile

[OpenJDK 2D-Dev] Integrated: 7183828: Invalid Image Variant when using anything other than BufferedImage

2020-09-10 Thread Sergey Bylokhov
On Tue, 8 Sep 2020 21:16:10 GMT, Sergey Bylokhov wrote: > It is intended that our draw machinery works only on specific image formats > that we know we support. > But the user still able to create some image subclasses for their purpose and > according to our spec of > Graphics2D.drawImage() we

[OpenJDK 2D-Dev] Integrated: 8252817: Cleanup the classes in the java.awt.color package

2020-09-10 Thread Sergey Bylokhov
On Sat, 5 Sep 2020 21:32:42 GMT, Sergey Bylokhov wrote: > - Class declarations reformat > - Docs cleanup This pull request has now been integrated. Changeset: ff21696b Author:Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/ff21696b Stats: 142 lines in 7 files changed

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Jorn Vernee
On Thu, 10 Sep 2020 15:50:39 GMT, Alan Bateman wrote: >> 14 cc'd mailing lists is unworkable. You need to be subscribed to lists to >> post, but even if you are a reply-all will >> be delayed due to all of the mails being held up for moderator approval due >> to: >> " Too many recipients to the

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Alan Bateman
On Thu, 10 Sep 2020 13:53:10 GMT, David Holmes wrote: >> @dholmes-ora raises a good point. Hopefully there is a balance point between >> a dozen different bugs / pull requests >> each targeting one area and one bug / PR targeting a dozen separate areas. I >> don't have a good general rule to su

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread David Holmes
On Thu, 10 Sep 2020 12:18:51 GMT, Kevin Rushforth wrote: >> This should be broken up to deal with the files in different functional >> areas under different bugids and PRs. Otherwise >> the cross-posting to so many lists is prohibitive. Files in different areas >> need to be reviewed by differe

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Kevin Rushforth
On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes wrote: >> The code in java.base was updated to use String::isEmpty in JDK 12 >> (JDK-8215281). There was follow-up in JDK 13 to do >> the same in the java.desktop module (JDK-8223237). Changing the remaining >> usages make sense although I see that

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Dmitriy Dumanskiy
On Thu, 10 Sep 2020 11:21:28 GMT, David Holmes wrote: >> The code in java.base was updated to use String::isEmpty in JDK 12 >> (JDK-8215281). There was follow-up in JDK 13 to do >> the same in the java.desktop module (JDK-8223237). Changing the remaining >> usages make sense although I see that

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread David Holmes
On Thu, 10 Sep 2020 10:40:15 GMT, Alan Bateman wrote: >> @kevinrushforth thanks. Done. >> >> Similar issues: >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8215014 >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=8251246 >> https://bugs.java.com/bugdatabase/view_bug.do?bug_id=822

Re: [OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase

2020-09-10 Thread Alan Bateman
On Thu, 10 Sep 2020 08:47:35 GMT, Dmitriy Dumanskiy wrote: >> Before this Enhancement can be formally reviewed, you will need a JBS bug >> ID. If you are already working with a >> Committer or Reviewer in the `jdk` project who has agreed to sponsor your >> change, they can file the Enhancement

Re: [OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
On Wed, 9 Sep 2020 20:21:44 GMT, Kevin Rushforth wrote: >> @mrserb hello. Thanks for the review. Any further actions required from me? > > Before this Enhancement can be formally reviewed, you will need a JBS bug ID. > If you are already working with a > Committer or Reviewer in the `jdk` projec

Re: [OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Sergey Bylokhov
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). src/demo/share/java2d/J2DBench/src/j2dben

Re: [OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Kevin Rushforth
On Wed, 9 Sep 2020 07:57:48 GMT, Dmitriy Dumanskiy wrote: >> @doom369 jcheck requires an associated issue > > @mrserb hello. Thanks for the review. Any further actions required from me? Before this Enhancement can be formally reviewed, you will need a JBS bug ID. If you are already working wit

Re: [OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread thatsIch
On Sun, 6 Sep 2020 13:57:19 GMT, Dmitriy Dumanskiy wrote: > **isEmpty** is faster + has less byte code + easier to read. Benchmarks could > be found > > [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). @doom369 jcheck requires an associated is

Re: [OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
On Sun, 6 Sep 2020 18:08:15 GMT, thatsIch wrote: >> **isEmpty** is faster + has less byte code + easier to read. Benchmarks >> could be found >> >> [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). > > @doom369 jcheck requires an associated issu

[OpenJDK 2D-Dev] RFR: 8252999: replace all String.equals("") usages with String.isEmpty()

2020-09-10 Thread Dmitriy Dumanskiy
**isEmpty** is faster + has less byte code + easier to read. Benchmarks could be found [here](https://medium.com/javarevisited/micro-optimizations-in-java-string-equals-22be19fd8416). - Commit messages: - Merge branch 'master' of https://github.com/doom369/jdk into reaplce_equal