You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Bernard <bh...@gmail.com> on 2013/08/12 08:44:52 UTC

Expiry and Performance Improvements

Hi,

We are in the lucky situation to fix a PageExpiredException bug and
improve performance at the same.

WICKET-4997 can be resolved with 2 lines of source code.

Component#urlFor() currently calls page.isPageStateless() (very
expensive) for every URL on a page where it should call
page.isBookmarkable() (very cheap).

Unfortunately, it consequently uses the wrong IRequestHandler for a
bookmarkable page. This results in PageExpiredException for
bookmarkable links which breaks the contract of
IPageSettings#setRecreateMountedPagesAfterExpiry(boolean
recreateMountedPagesAfterExpiry).

I wonder if this 2 line change could be included in the next release?

 The change breaks quite a few tests because of the necessary change
of expected responses in URLs (no surprise there, it is the unexpected
bookmarkable component in the URL where it currrently is just
"/page"). I have also seen a test that expects PageExpiredException
which will no longer occur in that context.

Thanks,

Bernard



Re: Expiry and Performance Improvements

Posted by Emond Papegaaij <em...@topicus.nl>.
This same piece of code also causes problems with wicket-atmosphere: 
WICKET-5084

On Monday 12 August 2013 18:44:52 Bernard wrote:
> Hi,
> 
> We are in the lucky situation to fix a PageExpiredException bug and
> improve performance at the same.
> 
> WICKET-4997 can be resolved with 2 lines of source code.
> 
> Component#urlFor() currently calls page.isPageStateless() (very
> expensive) for every URL on a page where it should call
> page.isBookmarkable() (very cheap).
> 
> Unfortunately, it consequently uses the wrong IRequestHandler for a
> bookmarkable page. This results in PageExpiredException for
> bookmarkable links which breaks the contract of
> IPageSettings#setRecreateMountedPagesAfterExpiry(boolean
> recreateMountedPagesAfterExpiry).
> 
> I wonder if this 2 line change could be included in the next release?
> 
>  The change breaks quite a few tests because of the necessary change
> of expected responses in URLs (no surprise there, it is the unexpected
> bookmarkable component in the URL where it currrently is just
> "/page"). I have also seen a test that expects PageExpiredException
> which will no longer occur in that context.
> 
> Thanks,
> 
> Bernard