[ 
https://issues.apache.org/jira/browse/WICKET-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464764
 ] 

Johan Compagner commented on WICKET-201:
----------------------------------------

I thought about it and it will be pretty hard to really change the current 
behavior
i only see one: Reduce the Page version of a page to max 1 (1extra then the 
current one)

why?

> Store only changes

   This can't be done because those changes do have call backs to the 
page/parent anyway so this will be very, very hard to reliable implement. 

> Store only pages when the fall out of the pagemap (not the current page 
> anymore)

  This is also not possible. A page when created new or a version is created 
(is also 'new') then the page has to be saved to disc.
  There is no other way. Else we are to late the next time and we will loose 
versions of the page. (of course max page versions to 10+ will solve this but 
that is just what we don't want)

So the only optimizations i can think if is:

1> If SecondLevelPageStore is used then the default max page versions is set to 
1 (1 extra then the current)
2> save the page to disk when it is newly created or if there is a new version 
created in the current request. (this is really needed else we are to late the 
next time!)
3> make sure that the next version of a page is always ++ (and not decreased 
when a page version is roll backed)


By the way, in wicket 2.0 there is code that can make versions of pages by only 
storing the changed real values (strings and numbers)
I did develop that with discussions with igor how to not serialize the page but 
make a special snapshot of the complete page (hash mapping all the values)
This code is now a bit untouched but maybe we could use it.
The planning was to create a snapshot map when a request comes in for a page 
(just before anything happens to it) then compare it in the end and only store 
the really changed values. Then we have automatic page versioning..  But don't 
know if that could really work.


> refactor storing pages and versions
> -----------------------------------
>
>                 Key: WICKET-201
>                 URL: https://issues.apache.org/jira/browse/WICKET-201
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Eelco Hillenius
>         Assigned To: Johan Compagner
>             Fix For: 1.3, 2.0
>
>
> See http://www.nabble.com/refactor-storing-pages-and-versions-tf2943670.html 
> for a discussion.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to