-
1. Re: Is Seam EntityQuery and EntityHome acceptable for production?
luxspes Oct 29, 2009 4:40 PM (in response to xsalefter.xsalefter.yahoo.com)Do you use Richfaces? And if you do... do you have http compression enabled? because UIs base on Richfaces generete a huge amount of xhtml markup that is only bearable with http compression.
They have made a little improvement with their latest 3.3.2 release and hopefully that will get fixed with Richfaces 4.0, but until then...
-
2. Re: Is Seam EntityQuery and EntityHome acceptable for production?
xsalefter.xsalefter.yahoo.com Oct 29, 2009 5:02 PM (in response to xsalefter.xsalefter.yahoo.com)Hi Francisco..
Thanks for your reply. Do you mean the Http compression like Christian's post?
Have you use seam in production using EntityQuery and EntityHome? I'm just curious, there is just my application, or there is something wrong with my way when developing seam based web application?
-
3. Re: Is Seam EntityQuery and EntityHome acceptable for production?
luxspes Oct 29, 2009 6:58 PM (in response to xsalefter.xsalefter.yahoo.com)yes, http compresion as in Christian's post.
AFAIK there is nothing intrinsically
bad for performance
in EntityQuery and EntityHome (although I think it is a design that has an abstraction leak when trying to deal with recursive relationships, but that is another story). I would have to see your code to find out what is making it slow, and even then there are hundreds of other factors, such as the performance of your network, database configuration, etc that could affect performance... -
4. Re: Is Seam EntityQuery and EntityHome acceptable for production?
cash1981 Oct 30, 2009 11:40 PM (in response to xsalefter.xsalefter.yahoo.com)I tend to not use EntityQuery/Home objects in seam. I like to have control of everything my self and find it easier and much more readable code. For the normal crud like applications its ok I guess.
You should read http://in.relation.to/Bloggers/LearnHowToSpeedUpYourJSFbasedSeamApplicationPart1Of2 by Dan Allen. It's really really good and should help you figure out how to speed up your app.
-
5. Re: Is Seam EntityQuery and EntityHome acceptable for production?
cash1981 Oct 30, 2009 11:42 PM (in response to xsalefter.xsalefter.yahoo.com)This is also a good article if your site is open. http://chiralsoftware.com/launching-a-jboss-seam-site/jboss-seam-problems.seam
-
6. Re: Is Seam EntityQuery and EntityHome acceptable for production?
luxspes Nov 2, 2009 7:26 AM (in response to xsalefter.xsalefter.yahoo.com)
Shervin Asgari wrote on Oct 30, 2009 23:40:
I tend to not use EntityQuery/Home objects in seam. I like to have control of everything my self and find it easier and much more readable code. For the normal crud like applications its ok I guess.In fact, CRUD is one of the things the EntityQuery/Home objects are bad for: JBSEAM-3903 .
-
7. Re: Is Seam EntityQuery and EntityHome acceptable for production?
cash1981 Nov 3, 2009 7:41 PM (in response to xsalefter.xsalefter.yahoo.com)I see. Well I
almost
never it use anyways. -
8. Re: Is Seam EntityQuery and EntityHome acceptable for production?
nickarls Nov 3, 2009 7:48 PM (in response to xsalefter.xsalefter.yahoo.com)using s:convertEntity a lot?
-
9. Re: Is Seam EntityQuery and EntityHome acceptable for production?
xsalefter.xsalefter.yahoo.com Nov 4, 2009 4:33 AM (in response to xsalefter.xsalefter.yahoo.com)Hi all. thanks your reply.
I would have to see your code to find out what is making it slow, and even then there are hundreds of other factors, such as the performance of your network, database configuration, etc that could affect performance...Nothing special from my code. For example I just add new method like:
public Muzakki getByUploadCode(String code) { List<Muzakki> list = getEntityManager(). createQuery("from Muzakki m where lower(m.uploadCode) = :code"). setParameter("code", code.toLowerCase().trim()).setMaxResults(1). getResultList(); return list.size() == 0 ? null : list.get(0); }
In my EntityHome, or
// Used in combo box public List<City> selectAll() { setMaxResult(999999); return getResultList(); } // For cascade combo box; public void setRestrictionForList() { List<String> restriction = new ArrayList<String>(); setEjbql(EJBQL); restriction.add ("lower(city.province.id)=#{organizationalMuzakkiHome.instance.address.province.id}"); restriction.add ("lower(city.province.id)=#{personalMuzakkiHome.instance.address.province.id}"); setRestrictionLogicOperator("or"); setRestrictionExpressionStrings(restriction); }
In my EntityList.
You should read http://in.relation.to/Bloggers/LearnHowToSpeedUpYourJSFbasedSeamApplicationPart1Of2 by Dan Allen. It's really really good and should help you figure out how to speed up your app.Yes, I has been reading the article. And it is very good, but unfotunately my project was build heavily top on seam gen EntityQuery and EntityHome.
My decision is creating an application as soon as possible, and then optimize the performance later.
This is also a good article if your site is open. http://chiralsoftware.com/launching-a-jboss-seam-site/jboss-seam-problems.seamThanks a lot for the link. I never read it before.
In fact, CRUD is one of the things the EntityQuery/Home objects are bad for: JBSEAM-3903.Yes, you are right. But for this time it is enough to creating an alert and info at the top of each form that confirm the user to choose the dependent entity first, and then the rest of form :D .
using s:convertEntity a lot?Yes, dozen :D . I know this is a have impact on the performance, but did I have another solution, esspecially for fill the data to the combo box?
I've thinking about parse the value in another place like
public List<SelectItem> comboBoxValueFactory() { List<City> list = entityManager.createQuery("from City").getResultList(); List<SelectItem> result = new ArrayList<SelectItem>(); for (City city : list) { result.add( new SelectItem(city.getId(), city.getName()) ); } return result; }
I dont know, do you think it will resolve the problem? (I never tried this before).
-
10. Re: Is Seam EntityQuery and EntityHome acceptable for production?
nickarls Nov 4, 2009 8:23 AM (in response to xsalefter.xsalefter.yahoo.com)I had a case with lots of s:converters and had to rewrite them, got the response time down from
6s to0.5s (and this was effecting all partial submits etc). I ended up writing a kind-of-entityConverter where I made SelectItems with the value pointing into the index of the List of the Entities.Test if it's applicable to your case, remove all s:convertEntity with dummy SelectItem dropdowns just to see if response time improves.