Im against introducing yet another strategy into this. We already provide IModel interface which is easy to implement. If someone wants to use ognl instead of the wicket's default they are more then welcome to roll their own impementation of IModel. Maybe we can rename/save our current ognl implementations and offer them as alternatives in the wicket-extensions project.
-Igor > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Alexandru Popescu > Sent: Wednesday, October 26, 2005 6:49 PM > To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] replace ognl. > > Please don't get the impression I haven't believed you; I was > just wondering. > > My opinion on this matter is according to "make simple things > easy, and complex things possible". > I am not aware of how this part is currently implemented, but > I guess the best approach would be a value retrieval strategy > defaulting to the new implementation, but also allow changing > it with an ognl strategy. > > my 2euroc > > ./alex > -- > .w( the_mindstorm )p. > > #: Johan Compagner changed the world a bit at a time by > saying on 10/27/2005 2:34 AM :# > > It is the expression parser. > > Thats why i ask it here. How many people are really using extreme > > things of ognl Because i think 99% is just using the basic > what i have > > implemented now. > > > > I tested it all in YourKit. and when i just submit the FormInput > > example of us 20 times (with some different data and some times > > errors) i see those results. > > It is all comes from Ognl.parsExpression() and its call to > > ognl.JavaCharStream, all the time and all the garbage is > comming from > > that area. > > > > And if 20 times submitting a form really kost 40MB (extra) > of garbage > > then i really don't want to know what it cost when 200 persons are > > working at the same time on my application... > > > > I think ognl is just to much for what we want. > > > > i attached 2 screen dumps of yourkit. > > 1> cpu: you see that doPost/doGet (is the same for wicket app) does > > 1> take 59% > > of total runtime time but 58% of the total time is spend in Ognl! > > thats onle 1% that does something else. > > 2> mem: you see the dump of the singleselectchoice. One of the > > 2> components of > > forminput and only that component generated 2MB of garbage > in the Ognl > > part > > > > johan > > > > > > On 10/27/05, Alexandru Popescu > <[EMAIL PROTECTED]> wrote: > >> > >> #: Johan Compagner changed the world a bit at a time by saying on > >> 10/27/2005 1:41 AM :# > >> > Hi > >> > > >> > I have written a replacement of OGNL when i test it with a very > >> > simple > >> test > >> > (The FormInput example) > >> > then i see quite some improvements in cpu speedups and mem > >> > improvements > >> > > >> > Around 40% speed increase for a submitting the forminput example > >> > page 20 times and only 1/5 of the memory garbage is > generated (50MB > >> > against 10MB) > >> > > >> > >> John this really makes me wonder, cause I know quite a few > projects > >> using ognl and never heard complains about it. Have you > noticed such > >> complaints or is this completely new? > >> > >> Most probably the improvement may come from removing the > expression > >> parser (as in the examples you have presented such a > parsing is not > >> required), but still I am wondering if the parser should > take so long > >> for simple expression as those. > >> > >> sorry for wondering, > >> > >> ./alex > >> -- > >> .w( the_mindstorm )p. > >> > >> > The question is what do you guys use of ognl? Can i > completely drop > >> > it > >> or > >> > must i make it an option so > >> > that you can switch in youre application for all using > ognl or the > >> homebrew > >> > wicket impl. > >> > Or make seperate classes (like AbstractPropertyModel) > but this is > >> > not > >> really > >> > doable because then all the > >> > sub classes must also be copied...(Like CompoundXX) > >> > > >> > What i do support now is this: > >> > > >> > person.name <http://person.name> <http://person.name> (plain > >> > properties) person.addresses.0.street (addresses is a list and i > >> > take the first > >> element) > >> > person.addresses.homeaddress.street (addresses is map and i take > >> > the > >> address > >> > with the key 'homeaddress' out of it) > >> > > >> > so maps and list are seen and the next part of the expression is > >> > then > >> the > >> > key or the index you can also put values in a map or > append/set to > >> > a list: > >> > > >> > person.addresses.homeaddress = new Address() > person.addresses.10 = > >> > new Address() > >> > > >> > if the list size is smaller then 10 then it will appends null to > >> > make it that size. > >> > > >> > addresses can also be an Array but then it won't be able to grow. > >> > > >> > Ofcourse the person.address.street will just be null if > address is > >> > null, > >> no > >> > exception will be thrown > >> > if you try to set something on a null object a exception is still > >> thrown, > >> > Maybe we could make some null handlers for that somehow that are > >> > easy useable. > >> > > >> > So can people live with this? Does anybody uses > something different > >> > of > >> ognl? > >> > > >> > johan > >> > > >> > >> > >> > >> ------------------------------------------------------- > >> This SF.Net email is sponsored by the JBoss Inc. > >> Get Certified Today * Register for a JBoss Training Course Free > >> Certification Exam for All Training Attendees Through End of 2005 > >> Visit http://www.jboss.com/services/certification for more > >> information _______________________________________________ > >> Wicket-user mailing list > >> Wicket-user@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through > End of 2005 Visit http://www.jboss.com/services/certification > for more information _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user