Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Johan Compagner
with the current 1.3 if you hold page references in other pages the
the main pag is not serialized as a whole. Every page reference we
come across is saved by itself in its own file. So pages are not saved
twice or multiply in more then one file. The only thing i dont know
currenlty is if PageX is the request page, PageY the response with a
reference to PageX then it is still possible then PageX is saved twice
(one time as main page and one time as a sub one, but this will result
in one file for pagex)

On 6/23/07, Iman Rahmatizadeh [EMAIL PROTECTED] wrote:
 Does holding references to other Pages inside a Page make them be serialized
 twice ? Like :

 class MyPage extends Page {

 ListPage otherPages;
 
 }

 would it make any difference if it was inside another object, like :


 class MyPage extends Page {

 MyPageHolder pageHolder; // serializable
 
 }



 finally, where exactly is this logic hidden in wicket code, so I can give it
 a closer look ?

 Iman


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Johan Compagner

no, also normal serialization.
1 page instance (id/version) is never saved in more then 1 file

johan


On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 with the current 1.3 if you hold page references in other pages the
 the main pag is not serialized as a whole. Every page reference we
 come across is saved by itself in its own file. So pages are not saved
 twice or multiply in more then one file. The only thing i dont know
 currenlty is if PageX is the request page, PageY the response with a
 reference to PageX then it is still possible then PageX is saved twice
 (one time as main page and one time as a sub one, but this will result
 in one file for pagex)

You are talking about the optimizatinos in the custom serialization
mechanism, right?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Eelco Hillenius
 with the current 1.3 if you hold page references in other pages the
 the main pag is not serialized as a whole. Every page reference we
 come across is saved by itself in its own file. So pages are not saved
 twice or multiply in more then one file. The only thing i dont know
 currenlty is if PageX is the request page, PageY the response with a
 reference to PageX then it is still possible then PageX is saved twice
 (one time as main page and one time as a sub one, but this will result
 in one file for pagex)

You are talking about the optimizatinos in the custom serialization
mechanism, right?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Eelco Hillenius
On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:
 no, also normal serialization.
 1 page instance (id/version) is never saved in more then 1 file

Oh. See, I go on vacation for two weeks and I miss the serialization
magic you've put into Page :)

Nice job though!

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Matej Knopp
Two weeks? No, we started doing that on apache con :)

-Matej

On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote:
 On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:
  no, also normal serialization.
  1 page instance (id/version) is never saved in more then 1 file

 Oh. See, I go on vacation for two weeks and I miss the serialization
 magic you've put into Page :)

 Nice job though!

 Eelco

 -
 This SF.net email is sponsored by DB2 Express
 Download DB2 Express C - the FREE version of DB2 express and take
 control of your XML. No limits. Just data. Click to get it now.
 http://sourceforge.net/powerbar/db2/
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-23 Thread Iman Rahmatizadeh

On 6/23/07, Johan Compagner [EMAIL PROTECTED] wrote:


with the current 1.3 if you hold page references in other pages the
the main pag is not serialized as a whole. Every page reference we
come across is saved by itself in its own file. So pages are not saved
twice or multiply in more then one file. The only thing i dont know
currenlty is if PageX is the request page, PageY the response with a
reference to PageX then it is still possible then PageX is saved twice
(one time as main page and one time as a sub one, but this will result
in one file for pagex)



How about 1.2.x ? Does it handle page references intelligently ?
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Question on Serialization

2007-06-22 Thread Iman Rahmatizadeh

Does holding references to other Pages inside a Page make them be serialized
twice ? Like :

class MyPage extends Page {

   ListPage otherPages;
   
}

would it make any difference if it was inside another object, like :


class MyPage extends Page {

   MyPageHolder pageHolder; // serializable
   
}



finally, where exactly is this logic hidden in wicket code, so I can give it
a closer look ?

Iman
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-22 Thread Eelco Hillenius
 Does holding references to other Pages inside a Page make them be serialized
 twice ? Like :

 class MyPage extends Page {

 ListPage otherPages;
 
 }

Yep, if you are using the SecondLevelCacheSessionStore, which is the
default for Wicket 1.3, evry page will get serialized as a whole, and
everytime you do that, it needs to resolve all the references
completely.

Note that this does not mean you will be using more RAM - that's the
same (except for the object pointer).

 would it make any difference if it was inside another object, like :


 class MyPage extends Page {

  MyPageHolder pageHolder; // serializable
  
  }


Nope. Any object that is non-transient and referencable will be
serialized, so this won't help.

There are optimizations possible, but it will probably be a hit on
your programming convenience. For instance, I think it is possible to
just store the page map/ page id and page version combination and use
that if you want to redirect to a previous one. Might be an idea to
check out if you are worried about optimizing.

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Question on Serialization

2007-06-22 Thread Iman Rahmatizadeh

On 6/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote:


 Does holding references to other Pages inside a Page make them be
serialized
 twice ? Like :

 class MyPage extends Page {

 ListPage otherPages;
 
 }

Yep, if you are using the SecondLevelCacheSessionStore, which is the
default for Wicket 1.3, evry page will get serialized as a whole, and
everytime you do that, it needs to resolve all the references
completely.

Note that this does not mean you will be using more RAM - that's the
same (except for the object pointer).



So actually it wont do any harm, just an object reference is added, right ?


would it make any difference if it was inside another object, like :


 class MyPage extends Page {

  MyPageHolder pageHolder; // serializable
  
  }


Nope. Any object that is non-transient and referencable will be
serialized, so this won't help.

There are optimizations possible, but it will probably be a hit on
your programming convenience. For instance, I think it is possible to
just store the page map/ page id and page version combination and use
that if you want to redirect to a previous one. Might be an idea to
check out if you are worried about optimizing.



Actually I just want to make sure it wont take much more ram either way. I
am trying to implement a simple BreadCrumb bar, by keeping each page's
breadcrumb history (the recent page references) in itself. Is this a safe
way for a page to hold references to other pages ?

Thanks a lot !
Iman
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user