You will not be able to see the difference between optimalization...
String.equals() does exactly that, it test for length
Aha! This is new for me. The last time I checked (Java 1.3) there were
are least 2 instanceof operators in the implementation of
String.equals(String) and no length
and where we just do this .equals(value) without testing for null
i will not rewrite those by first testing null to be able to call for
length.
This is wrong, we never said so. Just meant switching from
[nullability-check] !.equals(value) to [nullability-check]
value.length() != 0... ONLY
He is just saying he doesn't want to rewrite the cases that do not have
a null check.
Please re-read yourself ;)
Manuel Barzi schreef:
and where we just do this .equals(value) without testing for null
i will not rewrite those by first testing null to be able to call for
length.
This
He is just saying he doesn't want to rewrite the cases that do not have
a null check.
Very weill, but the question is: whoever promoted that idea? Seems to
be auto-promoted and auto-rejected... ;)
Anyway, have a nice day!
Indeed 8)
I should probably be denied write-access to this list for at least a
week. None of my e-mails seem to hit the mark at the moment.
Erik.
Manuel Barzi schreef:
He is just saying he doesn't want to rewrite the cases that do not have
a null check.
Very weill, but the
There's also wicket.util.string.Strings#isEmpty
(http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence)
to consider...
/Gwyn
On 22/09/06, Erik van Oosten [EMAIL PROTECTED] wrote:
Indeed 8)
I should probably be denied write-access to this list for
There's also wicket.util.string.Strings#isEmpty
(http://wicket.sourceforge.net/apidocs/wicket/util/string/Strings.html#isEmpty(java.lang.CharSequence)
to consider...
Just FYI, what people from Apache does (matching Erik's optimization
proposal ;)... I guess wicket does the same.
i just checked an 1.3 String implementation and there the same thing was doneAs far as i know they have to do that. How else would you test for equals for a string?You have to walk the chars on both sides comparing it. So if you don't test
first for lenght the length can be different and if you
almost: public static boolean isEmpty(final CharSequence string) { return string == null || string.length() == 0 || string.toString().trim().equals(); }so we could also do this:
public static boolean isEmpty(final CharSequence string) { return string == null || string.length() == 0 ||
Sirs... WicketUsersMailingListStackOverflowException: discussion has
branched interesting, but to the infinite ;)
i just checked an 1.3 String implementation and there the same thing was
...
...
-
Take Surveys. Earn
what can i say :) i like performance discussions.. :)Yourkit is running constantly on all my java programs that i run/debug on my laptop..On 9/22/06, Manuel Barzi
[EMAIL PROTECTED] wrote:Sirs... WicketUsersMailingListStackOverflowException: discussion has
branched interesting, but to the
what can i say :) i like performance discussions.. :)
:) That's fine, at the end it's very nutritive...
Yourkit is running constantly on all my java programs that i run/debug on my
laptop..
Good! should try it...
-
Take
lol, if there is one thing i learned from working on wicket it is that if you are going to discuss optimizations with johan you have to bring your a-game-IgorOn 9/22/06,
Johan Compagner [EMAIL PROTECTED] wrote:
what can i say :) i like performance discussions.. :)Yourkit is running constantly on
;) ha! never give up...
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT business topics through brief surveys -- and earn cash
Hi, Igor
what do you mean act as a link when clicked? a button submits the form -
that is its purpose. if you dont want it to submit the form then instead of
using type=submit use type=button and dont use Button but a
webmarkupcontainer that sets the onclick attr to whatever you want.
Yes,
Note that I am using the INPUT(type=button) / BUTTON html element as a
standalone component, not inside a form...
Wait for your answer... hope to come soon. Thanks.
On 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
Hi, Igor
what do you mean act as a link when clicked? a button submits the
Ok, Igor, I already solved this issue by re-implementing Link class in
my custom LinkButton class, just adding the following snippet
extracted from Button class, and added to the original
onComponentTag Link in this new LinkButton class:
---
// Default handling for tag
If this gets accepted, may I humbly suggest to replace
value != null !.equals(value)
with
value != null value.length() != 0
The latter performs considerably faster (though it is of course still a
micro optimization).
Regards,
Erik.
--
Erik van Oosten
On 9/21/06, Erik van Oosten [EMAIL PROTECTED] wrote:
If this gets accepted, may I humbly suggest to replacevalue != null !.equals(value)withvalue != null value.length() != 0The latter performs considerably faster (though it is of course still a
micro optimization).You are welcome to submit a
Hi, Erik,
If this gets accepted, may I humbly suggest to replace
value != null !.equals(value)
with
value != null value.length() != 0
The latter performs considerably faster (though it is of course still a
micro optimization).
You're right... already updated! Thanks.
Hi, Frank,
You are welcome to submit a patch :)
Yeah, why not... should I enroll wicket-devel to submit this patch,
you tell me...
Thanks.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's
Sry I was talking to Erik that if he's got a better way to do such checks in Wicket. Since I haven't been following this discussion I can't really say if what your doing is something that can be used :) Frank
On 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
Hi, Frank, You are welcome to submit a
I know, I know, you were addressing to Erik... just told you as I have
the hot-code here updated...
On 9/21/06, Frank Bille [EMAIL PROTECTED] wrote:
Sry I was talking to Erik that if he's got a better way to do such checks in
Wicket.
Since I haven't been following this discussion I can't
(Btw, SRY is the s---e---x determining Y chromosome... meaning that :?)
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT
Sry again. Please submit patch if you have the time. We use sourceforge's bugtracker:https://sourceforge.net/tracker/?group_id=119783atid=684975
FrankOn 9/21/06, Manuel Barzi [EMAIL PROTECTED] wrote:
I know, I know, you were addressing to Erik... just told you as I havethe hot-code here
LOL
I'll refrain from sending trivial changes to the wicket list in the
future :)
Erik.
--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/
-
Take Surveys. Earn Cash. Influence the Future of IT
Join
and I stop talking to people when my head is not clear... :SFrankOn 9/21/06, Erik van Oosten [EMAIL PROTECTED]
wrote:LOLI'll refrain from sending trivial changes to the wicket list in the
future :) Erik.--Erik van
:) so trivial? then, let it be...
I guess with a global search replace tool, you may
micro-optimize likely a lot of portions of code containing that
non-optimized comparison...
(will try, nevertheless, to submit that patch...)
Very true. BTW this sounds like a PMD rule :)
Still, they will be micro optimizations, only noticeable when they occur
in a long loop.
Usually its good architecture that will give you real performance gains.
(This is why I love Wicket!)
Manuel Barzi schreef:
:) so trivial? then, let it be...
Submitted and CLOSED.
https://sourceforge.net/tracker/index.php?func=detailaid=1562907group_id=119783atid=684975
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
If you could do the actual change and then submit a patch for that change it will be even faster for us to handle it.FrankOn 9/21/06, Manuel Barzi
[EMAIL PROTECTED] wrote:Submitted and CLOSED.
https://sourceforge.net/tracker/index.php?func=detailaid=1562907group_id=119783atid=684975
And submit a patch just means attaching the patch to that bug report you have opened.FrankOn 9/21/06, Frank Bille
[EMAIL PROTECTED] wrote:If you could do the actual change and then submit a patch for that change it will be even faster for us to handle it.
FrankOn 9/21/06, Manuel Barzi
[EMAIL
If you could do the actual change and then submit a patch for that change it
will be even faster for us to handle it.
Done...
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and
And submit a patch just means attaching the patch to that bug report you
have opened.
Sí, chabón, ya te había entendido... ;)
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and
i guess this should be the last we hear from frank-IgorOn 9/21/06, Frank Bille [EMAIL PROTECTED]
wrote:and I stop talking to people when my head is not clear... :S
FrankOn 9/21/06, Erik van Oosten
[EMAIL PROTECTED]
wrote:LOLI'll refrain from sending trivial changes to the wicket list in the
You will not be able to see the difference between optimalization...String.equals() does exactly that, it test for lengthand where we just do this .equals(value) without testing for nulli will not rewrite those by first testing null to be able to call for length.
On 9/21/06, Erik van Oosten [EMAIL
Hi, there,
I am working with I18N and I have an HTML INPUT that has its value
property to be updated to the current locale, but also has to react as
a link when clicking, by means of onClick property.
I do this in wicket-java-side:
--
labelModel = new StringResourceModel(CaocAdminPage-lit-8,
On 9/20/06, Manuel Barzi [EMAIL PROTECTED] wrote:
Hi, there,I am working with I18N and I have an HTML INPUT that has its valueproperty to be updated to the current locale, but also has to react asa link when clicking, by means of onClick property.
what do you mean act as a link when clicked? a
38 matches
Mail list logo