Re: sun.awt.X11 logs still using String + (waste)

2013-04-12 Thread Anthony Petrov
Thanks Laurent. The fix looks fine to me, too. I've just pushed it to the repository: http://hg.openjdk.java.net/jdk8/awt/jdk/rev/4490ef60ecd3 Currently it's in the AWT forest. I expect it to be integrated to the Master JDK8 repository in a week or two. -- best regards, Anthony On 4/11/2013

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Sergey Bylokhov
Hello. New version looks fine to me. On 4/11/13 8:08 PM, Laurent Bourgès wrote: Anthony, Here is the updated webrev: http://jmmc.fr/~bourgesl/share/webrev-8010297.5/ Laurent 2013/4/11 Mandy Chung On 4/11/13 8:43 AM, Laurent Bourgès wrote: I don't understand if I should fix it or not ?

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Mandy Chung
On 4/11/13 9:08 AM, Laurent Bourgès wrote: Anthony, Here is the updated webrev: http://jmmc.fr/~bourgesl/share/webrev-8010297.5/ Great. Ship it! Mandy Laurent 2013/4/11 Mandy Chung > On 4/11/13 8:4

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Laurent Bourgès
Anthony, Here is the updated webrev: http://jmmc.fr/~bourgesl/share/webrev-8010297.5/ Laurent 2013/4/11 Mandy Chung > On 4/11/13 8:43 AM, Laurent Bourgès wrote: > > > I don't understand if I should fix it or not ? > > src/solaris/classes/sun/awt/X11/XListPeer.java >> Nit: line 1906 you rem

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Mandy Chung
On 4/11/13 8:43 AM, Laurent Bourgès wrote: I don't understand if I should fix it or not ? src/solaris/classes/sun/awt/X11/XListPeer.java Nit: line 1906 you remove isLoggable call here. Was it intentional (as it doesn't call concatenate any string?)? I think it's better to use

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Laurent Bourgès
Mandy, I'd really like to see if we can avoid the boilerplate "if (isLoggable(...)) logger.fine()" and help ease of development and I file a RFE (8012006). Agreed but there is no easy way to have clear code and performance: - maybe JDK 8 Supplier may help - or a shorter syntax: logger.isDebug

Re: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Mandy Chung
Laurent, On 4/11/13 6:19 AM, Laurent Bourgès wrote: Anthony, Mandy, here the 4th patch: http://jmmc.fr/~bourgesl/share/webrev-8010297.4/ Thanks for addressing the memory overhead concern and keeping this fix for clients of PlatformLogger. Looks good and I saw that you caught several existin

Fwd: sun.awt.X11 logs still using String + (waste)

2013-04-11 Thread Laurent Bourgès
Anthony, Mandy, here the 4th patch: http://jmmc.fr/~bourgesl/share/webrev-8010297.4/ It only contains awt / swing / net classes that use PlatformLogger (no code modification). Laurent

Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Anthony Petrov
Laurent, I'm not subscribed to those mailing list, too. So you could send/forward your review request to the lists yourself - no difference here. Note that I tried sending your message to net-dev@ in the past, and even contacted the maintainer of the mailing list via a private email, but I neve

Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Laurent Bourgès
Anthony or Mandy, Could you ask JMX / Security groups for me to review my patch ? I am currently not registered to these mailing lists. Do you ask me to split the patch in two part: PlatformLogger on one side and Logger on the other side ? Laurent 2013/4/9 Mandy Chung > On 4/9/13 12:37 AM, L

Re: sun.awt.X11 logs still using String + (waste)

2013-04-10 Thread Sergey Bylokhov
Hi, Laurent. The changes in awt/swing area looks good. On 4/8/13 3:32 PM, Laurent Bourgès wrote: Anthony, here is an updated patch concerning both PlatformLogger and Logger 'bad' usages: http://jmmc.fr/~bourgesl/share/webrev-8010297.3/ It impacts now awt, swing, JMX, security, network, and apa

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Mandy Chung
On 4/9/13 12:37 AM, Laurent Bourgès wrote: Mandy, first I would like to have the given patch applied to OpenJDK 8 (+ JDK7u) as it fixes many problems: - string concatenations - object creations (Object[] or other objects given as params) - method calls in log statements This is the patch you

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Anthony Petrov
Hi Laurent, Thanks for all your hard work! The fix looks fine to me. I'm also CC'ing jdk8-dev@ to let other teams review the changes in their areas. I've only reviewed the AWT part of the fix. -- best regards, Anthony On 4/8/2013 15:32, Laurent Bourgès wrote: Anthony, here is an updated pa

Re: sun.awt.X11 logs still using String + (waste)

2013-04-09 Thread Laurent Bourgès
Mandy, first I would like to have the given patch applied to OpenJDK 8 (+ JDK7u) as it fixes many problems: - string concatenations - object creations (Object[] or other objects given as params) - method calls in log statements In a second step, I can help somebody migrating JUL usages to Platfor

Re: sun.awt.X11 logs still using String + (waste)

2013-04-08 Thread Mandy Chung
Peter, Laurent, Peter's idea is a good one to add a couple of convenient methods to take Object parameters that will avoid the creation of array instances. I'd also like to know what variants being used in the jdk to determine the pros and cons of the alternatives (this issue also applies to

Re: sun.awt.X11 logs still using String + (waste)

2013-04-08 Thread Laurent Bourgès
Anthony, here is an updated patch concerning both PlatformLogger and Logger 'bad' usages: http://jmmc.fr/~bourgesl/share/webrev-8010297.3/ It impacts now awt, swing, JMX, security, network, and apache xml. Thanks for the review, Laurent 2013/4/8 Laurent Bourgès > Peter, Mandy, > > I think it

Re: sun.awt.X11 logs still using String + (waste)

2013-04-08 Thread Laurent Bourgès
Peter, Mandy, I think it would be great to make PlatformLogger very similar to Logger API: I mean JUL Logger already has only 1 convenient method with 1 param so it may be great to have the same API in PlatformLogger too: maybe extend it to 2 or 3 params ... Peter, could you look at the API diffe

Re: sun.awt.X11 logs still using String + (waste)

2013-04-08 Thread Peter Levart
On 04/07/2013 07:11 PM, Laurent Bourgès wrote: Hi I started fixing All PlatformlLogger "bad" usages and I am fixing also many jul Logger usages without isLoggable ... That represents a lot of changes and a very boring job. I think sending a webrew tomorrow. Hi Laurent, Since you're alrea

Re: sun.awt.X11 logs still using String + (waste)

2013-04-07 Thread Laurent Bourgès
Hi I started fixing All PlatformlLogger "bad" usages and I am fixing also many jul Logger usages without isLoggable ... That represents a lot of changes and a very boring job. I think sending a webrew tomorrow. Laurent Le 4 avr. 2013 14:08, "Laurent Bourgès" a écrit : > Ok, I can provide an up

Re: sun.awt.X11 logs still using String + (waste)

2013-04-04 Thread Laurent Bourgès
Ok, I can provide an updated patch after finding / fixing all usages. Probably in 1 or 2 days, Laurent 2013/4/4 Anthony Petrov > Yes, this makes sense. Do you want to update your fix for 8010297 to > include these changes as well? > > -- > best regards, > Anthony > > > On 04/04/13 15:47, Laure

Re: sun.awt.X11 logs still using String + (waste)

2013-04-04 Thread Anthony Petrov
Yes, this makes sense. Do you want to update your fix for 8010297 to include these changes as well? -- best regards, Anthony On 04/04/13 15:47, Laurent Bourgès wrote: Dear all, I just realized there is another problem with PlatformLogger log statements: XBaseWindow: public boolean grabIn

Re: sun.awt.X11 logs still using String + (waste)

2013-04-04 Thread Laurent Bourgès
Dear all, I just realized there is another problem with PlatformLogger log statements: XBaseWindow: public boolean grabInput() { grabLog.fine("Grab input on {0}", this); ... } This calls the PlatformLogger.fine( varargs): public void fine(String msg, Object... params) { lo