[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1810) Classic query parser inefficiency on WebLogic

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Nov 16 11:23:05 EST 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1810?page=all ]
     
Steve Ebersole closed HHH-1810:
-------------------------------

    Resolution: Rejected

I am not going to waste time working on the classic query parser for anything other than super critical bugs.  Good luck finding one ;)

> Classic query parser inefficiency on WebLogic
> ---------------------------------------------
>
>          Key: HHH-1810
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1810
>      Project: Hibernate3
>         Type: Improvement

>   Components: query-hql
>  Environment: Hibernate 3.0.5 with HHH-525 patch
> WebLogic 8.1 SP4
> SQL Server 2000 SP3
>     Reporter: Hemanta Gupta
>     Priority: Minor
>  Attachments: QueryTranslatorImpl.java
>
>
> With around 1600 named queries in the system, SessionFactory.checkNamedQueries() takes around 5 1/2 min on WebLogic 8.1, as compared to < 1/2 min on JBoss 4.0.3. The classic query translator is being used, mainly because the new AST based translator has issues on WebLogic (http://hibernate.org/250.html#A24).
> The issue boils down to the classic query parser trying to load bad class names on a system with relatively inefficient classloading. The parser breaks down queries into tokens and then tries to resolve many of the tokens (even the obviously 'bad' ones like '=', '(', ')', 'AND', 'OR', etc) as Java classes by calling ReflectHelper.classForName() on the tokens. Because of the way the method is written, ClassLoader.loadClass() and then Class.forName() will both be called before it can be determined that a token doesn't resolve to a Java class. This overhead is really killing performance on WebLogic.
> I patched QueryTranslatorImpl.getEntityPersisterUsingImports(String) to skip tokens which can't resolve to Java classes (i.e are not Java identifiers or are HQL keywords). The file is attached. After applying this patch, the time taken by SessionFactory.checkNamedQueries() went down to around 20 sec on WebLogic. The patch isn't too beautiful or exhaustive, but it did the trick on our environment.
> Please also see the forum thread at http://forum.hibernate.org/viewtopic.php?t=943427

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list