Re: Performance optimization

2012-02-26 Thread Martin Makundi
this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-optimization-tp4412659p4419111.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr

Re: Performance optimization

2012-02-25 Thread Martin Makundi
Also public IResourceStream getMarkupResourceStream(MarkupContainer container, Class? containerClass) { seems quite feasible for making conditional markup. However, I must override MarkupContainer.getAssociatedMarkupStream(enforceReload=true) and IMarkupCacheKeyProvider.getCacheKey(==null)

Re: Performance optimization

2012-02-25 Thread Martin Makundi
Now that I am working with the markupresourcestream directly, I am beginning to think that Wicket should support dually both component hierarchy and markup hierarchy. Wicket chould have two kinds of add methods: add(Component c) add(String anchorId, MarkupResourceStreamProvider c) Such a

Re: Performance optimization

2012-02-25 Thread Igor Vaynberg
this is the same as add(new label(foo, new loadabledetachablemodel() { load() { return markup }}).setescapemdoelstrings(false)) -igor On Sat, Feb 25, 2012 at 2:00 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Now that I am working with the markupresourcestream directly, I am

Re: Performance optimization

2012-02-25 Thread Martin Makundi
this is the same as add(new label(foo, new loadabledetachablemodel() { load() { return markup }}).setescapemdoelstrings(false)) Is not completely same, because a MarkupResourceStreamProvider can also provide markup for other components to land on. ** Martin -igor On Sat, Feb 25, 2012 at

Re: Performance optimization

2012-02-25 Thread Igor Vaynberg
then its a panel -igor On Sat, Feb 25, 2012 at 4:44 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: this is the same as add(new label(foo, new loadabledetachablemodel() { load() { return markup }}).setescapemdoelstrings(false)) Is not completely same, because a

Re: Performance optimization

2012-02-25 Thread Martin Makundi
Sort of.. but it does not remain in the component tree and thus saves some memroy. Is a markup. ** Martin 2012/2/26 Igor Vaynberg igor.vaynb...@gmail.com: then its a panel -igor On Sat, Feb 25, 2012 at 4:44 PM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: this is the same

Re: Performance optimization

2012-02-24 Thread Per
/Performance-optimization-tp4412659p4419111.html Sent from the Users forum 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

Re: Performance optimization

2012-02-24 Thread Per
developers that there are faster libraries. They have tradeoffs, but maybe one of them works for you. Cheers, Per -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-optimization-tp4412659p4419130.html Sent from the Users forum mailing list archive

Re: Performance optimization

2012-02-24 Thread Martin Makundi
Cheers, Per -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Performance-optimization-tp4412659p4419130.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e

Re: Performance optimization

2012-02-24 Thread Martin Makundi
@Per I wrote a blogpost over here: http://www.small-improvements.com/blog/technical/tuning-wicket-session-size Did you try this approach: if the component is stateless you can autoadd it in onbeforerender(), such components are removed at the end of the request ? ** Martin

RE: Performance optimization

2012-02-24 Thread Chris Colman
is usually orders of magnitude larger than the space taken up by the object's attributes. -Original Message- From: Per [mailto:p...@hamburg.de] Sent: Saturday, 25 February 2012 12:13 PM To: users@wicket.apache.org Subject: Re: Performance optimization Martin Makundi wrote The problem

Re: Performance optimization

2012-02-24 Thread Martin Makundi
@Per about http://www.small-improvements.com/blog/technical/tuning-wicket-session-size You say If condition A is met, show label A. If not, use setVisible(false) to hide it. Combine that with Enclosures... Trouble is, while the hidden component doesn't show up in the markup, it's still part of

Re: Performance optimization

2012-02-23 Thread Martin Makundi
Hi! But adding thousands of small components will still produce a big page... Suggestions: - show less items per page. Who wants to scroll a page with thousands items ?! Use paging and filters. Is not an option. Our users fiddle with workshifts and they want to see everything on one

Re: Performance optimization

2012-02-23 Thread Bernard
If there are thousands of objects in a page then there is the question whether all of these objects actually represent state - state being the only reason why Wicket should serialize the page. In other words, is the page so complex that it requires 10MBytes to serialize itself in a manner that it

Re: Performance optimization

2012-02-23 Thread Martin Makundi
Wicket page serialization is asynchronous.. I wonder if it would be possible to queue pages in a way that they are serialized only after a certain timeout and if they are visited during timeout they will be taken directly from queue...? ** Martin 2012/2/23 Bernard bht...@gmail.com: If there are

Re: Performance optimization

2012-02-23 Thread Martin Grigorov
On Thu, Feb 23, 2012 at 9:14 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Wicket page serialization is asynchronous.. I wonder if it would be possible to queue pages in a way that they are serialized only after a certain timeout and if they are visited during timeout they will

Re: Performance optimization

2012-02-23 Thread Martin Makundi
Wicket 1.5: https://cwiki.apache.org/confluence/x/qIaoAQ This explains how page storing works. You were right about 1.4 ;) Question: If you don't serialize the page then how would you get it if it is not stored when the user presses browser back button ? Keep it in memory as it is. **

Re: Performance optimization

2012-02-23 Thread Martin Grigorov
On Thu, Feb 23, 2012 at 9:40 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Wicket 1.5: https://cwiki.apache.org/confluence/x/qIaoAQ This explains how page storing works. You were right about 1.4 ;) Question: If you don't serialize the page then how would you get it if it is

Re: Performance optimization

2012-02-23 Thread Martin Makundi
You were right about 1.4 ;) Question: If you don't serialize the page then how would you get it if it is not stored when the user presses browser back button ? Keep it in memory as it is. Your users have big monitors but your server has to have a lot of RAM too :-) Is easier to buy more

Re: Performance optimization

2012-02-23 Thread Bertrand Guay-Paquet
First of all, you stated that your problem what that the serialized size was too big, so please don't be so rude. Now, are you sure that the slow part of serialization is not the IO for storing that 10MB? If it is, zipping the page could definitely improve performance, even if it takes a some

Re: Performance optimization

2012-02-23 Thread Martin Grigorov
On Thu, Feb 23, 2012 at 3:55 PM, Bertrand Guay-Paquet ber...@step.polymtl.ca wrote: First of all, you stated that your problem what that the serialized size was too big, so please don't be so rude. Now, are you sure that the slow part of serialization is not the IO for storing that 10MB? If

Re: Performance optimization

2012-02-23 Thread Thomas Matthijs
On Thu, Feb 23, 2012 at 4:12 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size of over 10 MB? I have made all actual data objects non-serializable and

Re: Performance optimization

2012-02-23 Thread Bertrand Guay-Paquet
Even if it is asynchronous, it uses up some of the total IO capacity of the server. Reading the bytes back when the page is requested again is however a synchronous operation and it depends on IO. Anyway, if profiling shows that the slow part is the serialize call, then zipping won't help.

Re: Performance optimization

2012-02-23 Thread Martin Makundi
Thanks, I will try to wave my magic wand and see what happens ... 2012/2/23 Bertrand Guay-Paquet ber...@step.polymtl.ca: Even if it is asynchronous, it uses up some of the total IO capacity of the server. Reading the bytes back when the page is requested again is however a synchronous

Re: Performance optimization

2012-02-23 Thread Igor Vaynberg
On Thu, Feb 23, 2012 at 7:26 AM, Thomas Matthijs li...@selckin.be wrote: On Thu, Feb 23, 2012 at 4:12 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: Hi! Any experiences how to optimize the performance of a Page that contains nested ListView:s with a total page serialized size

Re: Performance optimization

2012-02-23 Thread Martin Makundi
I think the best optimisation for this kind of thing is probably to try to reduce the component count as much as possible by implementing custom components that render directly to html. +1 What might be the best way (performance-wise) to make such a custom component (rendering the dynamic

Re: Performance optimization

2012-02-23 Thread Igor Vaynberg
you can, for example, replace the entire listview with a single component like this: class workerlist extends webcomponent implements ilinklistener { oncomponenttagbody() { stringbuilder markup=new stringbuilder(); markup.append(table); for (worker:list) {

Re: Performance optimization

2012-02-23 Thread Martin Makundi
Looks powerful, thanks. What about partial ajax updates, should I design so that I can replace complete webcomponents (might restrict optimization) or is there a way to interact nicely with wicket-ajax with such inline code? ** Martin 2012/2/23 Igor Vaynberg igor.vaynb...@gmail.com: you can,

Re: Performance optimization

2012-02-23 Thread Igor Vaynberg
ajax updates work based on components, so in this particular case you would only be able to update the entire listview using ajax. so design your component breakdown accordingly. of course if you design these optimized components to be able to produce some part of its output you can use jquery

Re: Performance optimization

2012-02-23 Thread Martin Makundi
I wonder if there could be components that would melt/dissolve after use... ... for example a label: container.add(new Label(xx)); After use, the label output would become part of container's markup output at proper position, but there would remain no reference to an instance of label

Re: Performance optimization

2012-02-23 Thread Igor Vaynberg
if the component is stateless you can autoadd it in onbeforerender(), such components are removed at the end of the request -igor On Thu, Feb 23, 2012 at 11:09 AM, Martin Makundi martin.maku...@koodaripalvelut.com wrote: I wonder if there could be components that would melt/dissolve after

RE: Performance optimization

2012-02-23 Thread Chris Colman
could make it much more efficient if you did your own streaming. Regards, Chris -Original Message- From: Martin Makundi [mailto:martin.maku...@koodaripalvelut.com] Sent: Thursday, 23 February 2012 4:04 PM To: Bertrand Guay-Paquet Cc: users@wicket.apache.org Subject: Re: Performance

Re: Performance optimization

2012-02-22 Thread Bertrand Guay-Paquet
Hi, Have you seen the following thread? http://apache-wicket.1842946.n4.nabble.com/Shrinking-the-session-size-simply-by-zipping-it-Saved-my-day-td4402980.html Perhaps this can help you. That said, 10MB seems HUGE! Since you already use detachable models, maybe you could have a look at a memory

Re: Performance optimization

2012-02-22 Thread Martin Makundi
The problem is that the SERIALIZATION takes time. So it does not help to ZIP AFTER serialization... I have debugged it and it's just thousands and thousands of components. Even printing the component paths alone take almost 10mb or more because there is repetition ;) ** Martin 2012/2/23

Re: Performance optimization

2012-02-22 Thread Juha Syrjälä
Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example this one https://github.com/wicketstuff/core/wiki/Kryo-Serializer . That should make the serialization bit faster. -- Juha Syrjälä On

Re: Performance optimization

2012-02-22 Thread Martin Makundi
But is serializing wicket native components only.. I would assume wicket does it best. 2012/2/23 Juha Syrjälä juha.syrj...@gmail.com: Hi, Wicket 1.5 has support for pluggable serializers via ISerializer interface, you could try to plug in different serializer implementations, for example

Re: Performance optimization

2012-02-22 Thread Juha Syrjälä
Hi, I would guess that Wicket uses a normal Java built-in serializer by default. Here are some benchmarks for different serializer implementations https://github.com/eishay/jvm-serializers/wiki/ . Java's built-in serializer is not the fastest... -- Juha Syrjälä On 02/23/2012 08:45 AM,

Re: Performance optimization

2012-02-22 Thread Martin Makundi
I think that would be something that should be implemented at wicket core... anybody done this before? Is there any way to tell wicket NOT to serialize a page? For example give a timer if user does not invoke the page for 1 minutes it will not be serializeed..? ** Martin 2012/2/23 Juha

Re: Performance optimization

2012-02-22 Thread Martin Makundi
(ofcourse I mean invoke within 1 minute...) 2012/2/23 Martin Makundi martin.maku...@koodaripalvelut.com: I think that would be something that should be implemented at wicket core... anybody done this before? Is there any way to tell wicket NOT to serialize a page? For example give a

Re: Performance optimization

2012-02-22 Thread Martin Grigorov
Hi, Wicket 1.5 uses by default JavaSerializer (ISerializer impl based on Java Serialization API) because it is tested well (in previous versions of Wicket). It may be slower than other serialization frameworks but it works well in all cases. KryoSerializer is easy to use with Java objects and it