Re: Session size vs detached models
Hi, On Fri, Feb 14, 2014 at 3:55 PM, Daniel Stoch daniel.st...@gmail.comwrote: Hi, In Wicket 1.4 the last page reference is hold in a session (is it in 6.x also?). So after a request has been processed all components and models Yes. A live instance of the last used page is kept in the http session. Actually it is a list of page instances. All instantiated and touched pages in a request are saved for faster retrieval for the next request. https://cwiki.apache.org/confluence/display/WICKET/Page+Storage should be detached, so this last page reference should not hold transient LDM values. Is it true? LDM null-yfies its transien field explicitly: https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java?source=cc#L104 But if your custom model uses transient that is not null-yfied in onDetach() then it will be kept alive in the http session. When we are using DebugBar with SessionSizeDebugPanel, it displays session size and totalSize (by SessionTotalSizeModel). Does this totalSize includes size of object loaded by LDM or it counts all components and models size in detached state? I have to check what is th difference between size and totalSize, but since https://issues.apache.org/jira/browse/WICKET-4867 the detachable is detached before measuring its size. -- Daniel
Re: Session size vs detached models
On Fri, Feb 14, 2014 at 4:12 PM, Martin Grigorov mgrigo...@apache.orgwrote: should be detached, so this last page reference should not hold transient LDM values. Is it true? LDM null-yfies its transien field explicitly: https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/model/LoadableDetachableModel.java?source=cc#L104 But if your custom model uses transient that is not null-yfied in onDetach() then it will be kept alive in the http session. You mean in detach(), not onDetach() ;) When we are using DebugBar with SessionSizeDebugPanel, it displays session size and totalSize (by SessionTotalSizeModel). Does this totalSize includes size of object loaded by LDM or it counts all components and models size in detached state? I have to check what is th difference between size and totalSize, but since https://issues.apache.org/jira/browse/WICKET-4867 the detachable is detached before measuring its size. Ok, great to know. So it looks in 1.4.x totalSize is measured before detaching. Thanks for the answer. -- Daniel
Re: Session size with ModalWindow
I have experienced memory problems before with Page backed ModalWindow, so I'd recommend Panel backed. About versioning see Component.setVersioned(false). On Fri, Feb 25, 2011 at 11:45 AM, Stefan Lindner lind...@visionet.dewrote: We have a modal window (not matter Panel oder Page as content) which holds a lot of AjaxLinks. Each time an AjaxLink is clicked the session grows. Is there a way to suppress the versioning of the session and page? It's the PageMap that is growing. The ModalWindow does not hold any explicit reference to a page oder another component on the page. Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Session size with ModalWindow
You're right, using a panel as modal window's content is a little bit better. The session grows slower but it grows infinitely. Setting setVersioned to false did not make any difference. Any other idea? Stefan -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Freitag, 25. Februar 2011 10:55 An: users@wicket.apache.org Betreff: Re: Session size with ModalWindow I have experienced memory problems before with Page backed ModalWindow, so I'd recommend Panel backed. About versioning see Component.setVersioned(false). On Fri, Feb 25, 2011 at 11:45 AM, Stefan Lindner lind...@visionet.dewrote: We have a modal window (not matter Panel oder Page as content) which holds a lot of AjaxLinks. Each time an AjaxLink is clicked the session grows. Is there a way to suppress the versioning of the session and page? It's the PageMap that is growing. The ModalWindow does not hold any explicit reference to a page oder another component on the page. Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Session size with ModalWindow
I guess you have a cyclic reference somewhere... You'll need to use memory analyzer to check which objects contribute to the growing size. See Eclipse Memory Analyzer (http://www.eclipse.org/mat/) or jhat (comes with the JDK): 1. In jconsole - call GC 2. jmap -dump:live,format=b,file=heap.bin PID (captures the initial state) 3. Click on any of the links to make the session grow 4. jmap -dump:live,format=b,file=heap2.bin PID (captures a state with memory leak) jhat -J-mx768m heap.bin (to read and analyze the heap dump) On Fri, Feb 25, 2011 at 12:09 PM, Stefan Lindner lind...@visionet.dewrote: You're right, using a panel as modal window's content is a little bit better. The session grows slower but it grows infinitely. Setting setVersioned to false did not make any difference. Any other idea? Stefan -Ursprüngliche Nachricht- Von: Martin Grigorov [mailto:mgrigo...@apache.org] Gesendet: Freitag, 25. Februar 2011 10:55 An: users@wicket.apache.org Betreff: Re: Session size with ModalWindow I have experienced memory problems before with Page backed ModalWindow, so I'd recommend Panel backed. About versioning see Component.setVersioned(false). On Fri, Feb 25, 2011 at 11:45 AM, Stefan Lindner lind...@visionet.de wrote: We have a modal window (not matter Panel oder Page as content) which holds a lot of AjaxLinks. Each time an AjaxLink is clicked the session grows. Is there a way to suppress the versioning of the session and page? It's the PageMap that is growing. The ModalWindow does not hold any explicit reference to a page oder another component on the page. Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: session size
Hi guys! I resolved the problem. Here is what I was doing: - I have a page, let's say HomePage which extends WebPage. - This HomePage add a MenuPanel which extends Panel (add(new MenuPanel()). - This MenuPanel add a SubmenuPanel like this menuPanel.add(new SubmenuPanel(MenuPanel.this)). Because of this reference the whole page was kept in session and the session grows very fast. You can say that I can access the MenuPanel from SubmenuPanel using getParent() but let's omit this thing. Is it normal for wicket to keep these pages in session if you have this type of reference? Thanks! -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:33 PM To: users@wicket.apache.org Subject: Re: session size Okay, so you are storing *every* page in your page map in session. So, here's your next path (already partially explained by others): 1 - Consider: must you use http session store? why? A lot of folks *think* that they must, and they switch to it, but they don't really need to. Some honestly need to. 2 - run a profiler or memory analyzer and see what's actually being held in memory. Probably large domain objects, or sometimes even services. The reason you're holding these big objects is almost always one or both of the following: 1 - improper use of models. Not using detachable models. Putting things into new Model(someDomainObject). Or holding fields references to domain objects, or other large objects (even services). 2 - using final variables that are declared outside of an anonymous inner class from within it (which creates a field variable in the anon-inn-class for that object). -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote: Yes, I use HttpSessionStore. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:20 PM To: users@wicket.apache.org Subject: Re: session size Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session size
On Thu, Jan 20, 2011 at 2:42 AM, Mihai Toma mihai.t...@asf.ro wrote: Hi guys! I resolved the problem. Here is what I was doing: - I have a page, let's say HomePage which extends WebPage. - This HomePage add a MenuPanel which extends Panel (add(new MenuPanel()). - This MenuPanel add a SubmenuPanel like this menuPanel.add(new SubmenuPanel(MenuPanel.this)). Because of this reference the whole page was kept in session and the session grows very fast. You can say that I can access the MenuPanel from SubmenuPanel using getParent() but let's omit this thing. Is it normal for wicket to keep these pages in session if you have this type of reference? Every component has a reference to its page. So, what you described above should not be a problem. And since you're using HttpSessionStore, all pages will be serialized into session anyway. But pages and components themselves are not very large. You need to run a memory analyzer and look for: 1 - references to pages or components from another page hierarchy (don't pass one component to another page) 2 - (more likely) references to domain objects or, worse yet, services / daos that are being serialized -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
Re: session size
Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks!
Re: session size
Pages don't go to session by default, I executed the PageMapTest#testPagemapIsNotReferencedBySession on Wicket 1.4.8 and it is ok. I suspect you are referencing some expensive objects in an custom session. On Mon, Jan 17, 2011 at 12:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Pedro Henrique Oliveira dos Santos
Re: session size
Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*
RE: session size
Yes, I use HttpSessionStore. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:20 PM To: users@wicket.apache.org Subject: Re: session size Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: session size
Okay, so you are storing *every* page in your page map in session. So, here's your next path (already partially explained by others): 1 - Consider: must you use http session store? why? A lot of folks *think* that they must, and they switch to it, but they don't really need to. Some honestly need to. 2 - run a profiler or memory analyzer and see what's actually being held in memory. Probably large domain objects, or sometimes even services. The reason you're holding these big objects is almost always one or both of the following: 1 - improper use of models. Not using detachable models. Putting things into new Model(someDomainObject). Or holding fields references to domain objects, or other large objects (even services). 2 - using final variables that are declared outside of an anonymous inner class from within it (which creates a field variable in the anon-inn-class for that object). -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote: Yes, I use HttpSessionStore. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:20 PM To: users@wicket.apache.org Subject: Re: session size Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: session size
Thanks for your recommendations. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:33 PM To: users@wicket.apache.org Subject: Re: session size Okay, so you are storing *every* page in your page map in session. So, here's your next path (already partially explained by others): 1 - Consider: must you use http session store? why? A lot of folks *think* that they must, and they switch to it, but they don't really need to. Some honestly need to. 2 - run a profiler or memory analyzer and see what's actually being held in memory. Probably large domain objects, or sometimes even services. The reason you're holding these big objects is almost always one or both of the following: 1 - improper use of models. Not using detachable models. Putting things into new Model(someDomainObject). Or holding fields references to domain objects, or other large objects (even services). 2 - using final variables that are declared outside of an anonymous inner class from within it (which creates a field variable in the anon-inn-class for that object). -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* On Mon, Jan 17, 2011 at 9:27 AM, Mihai Toma mihai.t...@asf.ro wrote: Yes, I use HttpSessionStore. -Original Message- From: Jeremy Thomerson [mailto:jer...@wickettraining.com] Sent: Monday, January 17, 2011 5:20 PM To: users@wicket.apache.org Subject: Re: session size Are you using HttpSessionStore (this is not the default - which means you would have to explicitly set this up in your application class)? On Mon, Jan 17, 2011 at 8:41 AM, Martin Grigorov mgrigo...@apache.orgwrote: Try to find what is stored actually. Use memory analyzer tool like Eclipse one - http://www.eclipse.org/mat/ http://www.eclipse.org/mat/I expect that you store some bigger collections with your data with some of your components. On Mon, Jan 17, 2011 at 3:16 PM, Mihai Toma mihai.t...@asf.ro wrote: Hi! I have an application build with wicket and I have a session problem. If one user browse the application the session (the object WebSession) becomes bigger and bigger, so if I browse 20 pages the session size has around 16 Mb. When I start browsing the session has something less than 100 Kb. I read some things about the pages which are stored in session in pageMaps and versions and I make different settings in Application class (getSessionSettings().setMaxPageMaps(10); getSessionSettings().setPageMapEvictionStrategy(new LeastRecentlyAccessedEvictionStrategy(10)); ) but seems not to resolv my problem. Do you have any idea how can I limit the session size or how can I limit the number of pages stored in session? I use wicket 1.4.8. Thanks! -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org* - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Session size is constantly increasing on setResponsePage(getPage())
are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session size is constantly increasing on setResponsePage(getPage())
ok found it, We are leaking auto add html header containers. Looking to fix it. On 10/3/07, Johan Compagner [EMAIL PROTECTED] wrote: are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session size is constantly increasing on setResponsePage(getPage())
Hi, thanks for the quick response. Should I open a JIRA issue for this or is it to minor to justify the overhead? bw, Martin Johan Compagner wrote: ok found it, We are leaking auto add html header containers. Looking to fix it. On 10/3/07, Johan Compagner [EMAIL PROTECTED] wrote: are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13018499 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session size is constantly increasing on setResponsePage(getPage())
i think johan already fixed it in trunk. gerolf On 10/3/07, Martin2 [EMAIL PROTECTED] wrote: Hi, thanks for the quick response. Should I open a JIRA issue for this or is it to minor to justify the overhead? bw, Martin Johan Compagner wrote: ok found it, We are leaking auto add html header containers. Looking to fix it. On 10/3/07, Johan Compagner [EMAIL PROTECTED] wrote: are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13018499 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session size is constantly increasing on setResponsePage(getPage())
jip, but open and close a jira if you want to have this in the change list.. On 10/3/07, Gerolf Seitz [EMAIL PROTECTED] wrote: i think johan already fixed it in trunk. gerolf On 10/3/07, Martin2 [EMAIL PROTECTED] wrote: Hi, thanks for the quick response. Should I open a JIRA issue for this or is it to minor to justify the overhead? bw, Martin Johan Compagner wrote: ok found it, We are leaking auto add html header containers. Looking to fix it. On 10/3/07, Johan Compagner [EMAIL PROTECTED] wrote: are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13018499 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Session size is constantly increasing on setResponsePage(getPage())
I'm using trunk right now and the issue is resolved, the session size does not increase anymore when setting the response page. Since this was a critical one on our issue tracking, thanks for the quick fix. I opened jira https://issues.apache.org/jira/browse/WICKET-1036 WICKET-1036 and I'll close it then. bw, Martin Johan Compagner wrote: jip, but open and close a jira if you want to have this in the change list.. On 10/3/07, Gerolf Seitz [EMAIL PROTECTED] wrote: i think johan already fixed it in trunk. gerolf On 10/3/07, Martin2 [EMAIL PROTECTED] wrote: Hi, thanks for the quick response. Should I open a JIRA issue for this or is it to minor to justify the overhead? bw, Martin Johan Compagner wrote: ok found it, We are leaking auto add html header containers. Looking to fix it. On 10/3/07, Johan Compagner [EMAIL PROTECTED] wrote: are you talking about 1.2 or 1.3? in 1.2 a session could grow a little bit because we have there max 7 pages that all also can contain some version info. But as you said when you do setResponsePage(Page.class) everything drops to normal that means that you have to use 1.3 because then the newly created page replaces the old one in the session memory. But if you set in the link click the same page that the link is on (setResponsePage(getPage()). You see a grow? That seems a bit strange. need to check that out then. johan On 10/2/07, Martin2 [EMAIL PROTECTED] wrote: Hi there, we're developing a rather straight forward application with wicket and I am wondering if it is ok to call setResponsePage(getPage()) inside the onClick() method of a Link? Because the session size is constantly increasing, here's my example: Application class: public class TestApplication extends WebApplication { public TestApplication() { super(); } @Override public Class getHomePage() { return TestPage.class; } @Override protected void init() { super.init(); mountBookmarkablePage(/home, getHomePage()); } } Page class: public class TestPage extends WebPage { public TestPage() { super(); setVersioned(false); add(new TestLink(testLink)); } @Override protected void onBeforeRender() { super.onBeforeRender(); System.err.println(getSession().getSizeInBytes()); } } Link class: public class TestLink extends Link { public TestLink(String id) { super(id); } @Override public void onClick() { setResponsePage(getPage()); } } Everytime the Link is clicked the session size increases a bit (it may be tiny in this test application, it's nevertheless increasing constantly). Whenever (this clue comes from testing our real application) a new page is constructed (be it via setResponsePage(Page.class) or via url) the session size falls back to normal. When an older instance (via back button or link) is used, the session is as big as before. I also noticed that when using TabbedPanel (from wicket-extensions) each tab change (out of the box) increases the session size much more. All our models are LoadableDetachableModels, so our model objects are all transient and should never be stored in the session. Of course we use here and there a new PropertyModel() and other wrapper models, but only in constructors. Any suggestion what we could do about it? In the real application the increment is about 2-3Kb per click, which will become a problem since the application is click-intensive and collaborative (many session at the same time). Thanks in advance, Martin -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13004735 Sent from the Wicket - User mailing list archive at Nabble.comhttp://nabble.com/ . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Session-size-is-constantly-increasing-on-setResponsePage%28getPage%28%29%29-tf4556781.html#a13018499 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe,