What's taking so long in your isVisible() method?
The model object should be cached, and is isPositive() so expensive?
Sven
- Ursprüngliche Nachricht -
Von: Scott Swank
Gesendet: 16.01.09 02:06 Uhr
An: users@wicket.apache.org
Betreff: Re: Why you should not override isVisible
Martijn,
I just went through the source (1.4-rc1) to trace a detach manually and
find suspect callers of isVisible. I found none during detach, but I did
find one call to isVisible /after/ detach. A simple run confirmed this.
The call to isVisible /after/ detach can be found in method
. Sorry I could not provide sample to reproduce
this.
but I did see it happening.
- Original Message -
From: Erik van Oosten e.vanoos...@grons.nl
To: users@wicket.apache.org
Sent: Friday, January 16, 2009 4:18 AM
Subject: Re: Why you should not override isVisible
Martijn,
I just went
Thanks DVD, we already established that it is called more then once.
This discussion is talking about:
1. caching the visible value during the render phase to prevent the
potentially large performance hit of multiple invocations to isVisible
2. preventing calls to isVisible during or
be cached, and is isPositive() so expensive?
Sven
- Ursprüngliche Nachricht -
Von: Scott Swank
Gesendet: 16.01.09 02:06 Uhr
An: users@wicket.apache.org
Betreff: Re: Why you should not override isVisible
We have implemented this, perhaps a dozen times or more
Ok, IMHO it's a bug that wicket calls isVisible() after detachment.
Thus caching isVisible() is not needed.
Sven
- Ursprüngliche Nachricht -
Von: Michael Sparer
Gesendet: 16.01.09 11:20 Uhr
An: users@wicket.apache.org
Betreff: Re: Re: Why you should not override isVisible
+1
-Original Message-
From: s...@meiers.net [mailto:s...@meiers.net]
Sent: Friday, January 16, 2009 7:47 AM
To: users@wicket.apache.org
Subject: Re: Why you should not override isVisible
Ok, IMHO it's a bug that wicket calls isVisible() after detachment.
Thus caching isVisible
Please don't turn the logic around.
Caching is only needed because isVisible can be a performance hit.
/If/ you want caching /then/ isVisible should not be called after detach
as detach is needed to clear the cache.
Regards,
Erik.
s...@meiers.net wrote:
Ok, IMHO it's a bug that wicket
Sorry Sven,
You of course meant to say:
/If/ isVisible would no longer be called after detach /then/ it would be
possible to do the caching yourself (as you can use detach to clear the
cache).
/If/ you can cache yourself /then/ Wicket does not need to cache the
result of isVisible.
Created an issue:
http://issues.apache.org/jira/browse/WICKET-2025
Regards,
Erik.
Erik van Oosten wrote:
Martijn,
I just went through the source (1.4-rc1) to trace a detach manually
and find suspect callers of isVisible. I found none during detach, but
I did find one call to isVisible
Betreff: Re: Why you should not override isVisible
We have implemented this, perhaps a dozen times or more across our
application. For example, there are several payment options whose
relevance is determined by whether the customer owes any money on
their purchase (e.g. as opposed to using
@wicket.apache.org
Betreff: Re: Why you should not override isVisible
We have implemented this, perhaps a dozen times or more across our
application. For example, there are several payment options whose
relevance is determined by whether the customer owes any money on
their purchase (e.g. as opposed
Gesendet: 16.01.09 02:06 Uhr
An: users@wicket.apache.org
Betreff: Re: Why you should not override isVisible
We have implemented this, perhaps a dozen times or more across our
application. For example, there are several payment options whose
relevance is determined by whether the customer owes
In the thread Where to process PageParameters I was requested to
explain why I think you should not override isVisible, but rather should
call setVisible in onBeforeRender (slide 100 in my presentation
http://www.grons.nl/~erik/pub/20081112%20Effective%20Wicket.pdf).
There are 2 reasons, but
-1- isVisible is called a lot. It is easily called ten times within 1
request
If you need to optimize, you can use lazy initialization of a boolean
variable here and reset it in onBeforeRender?
-2- isVisible can make your model be reloaded multiple times within 1
request
If you need to
We have done exact that -- a lot. Driving isVisible() from the state
of the model is very clean, but the performance is potentially awful.
I have wondered whether this should be the default implementation for
Component.isVisible().
Is IVisitor.beforeRender() an appropriate place in the rendering
commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
/
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr
...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail
...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible
Hi Pierre,
I actually thought they were in English, but I now see that the first
few are in Dutch. Not sure why I did that. They are not that important,
so just read on...
Regards,
Erik.
Pierre Goupil wrote:
Good evening,
I'm sorry to bug you, but I'be read the presentation you're
/
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible
Indeed. If this would no longer be the case, overriding isVisible would
be no problem (though caching would be nice).
Regards,
Erik.
Martijn Dashorst wrote:
What is strange is that isvisible is being checked during detach (I
seriously doubt that). That shouldn't be happening: *all*
On Thu, Jan 15, 2009 at 9:38 PM, Erik van Oosten e.vanoos...@grons.nl wrote:
I actually thought they were in English, but I now see that the first few
are in Dutch. Not sure why I did that. They are not that important, so just
read on...
You can probably have a good laugh at google translate
...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands
/
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from
-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing list archive at Nabble.com
My idea what an inversion of that one:
Add a method to Component, such as isVisibleInternal() [no I don't
love the name] that would cache the results of isVisible(). Then all
code that currently calls isVisible() would be changed to call
isVisibleInternal() instead. Someone who really wanted
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21490448.html
Sent from the Wicket - User mailing list archive at Nabble.com
this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21490479.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21490479.html
Sent from the Wicket - User mailing list archive
/
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
--
View this message in context:
http://www.nabble.com/Why-you-should-not-override-isVisible-tp21474995p21483816.html
Sent from the Wicket - User mailing
37 matches
Mail list logo