ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "adamb (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)
Date Fri, 11 May 2007 03:28:15 GMT

    [ https://issues.apache.org/jira/browse/IBATIS-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494936

adamb commented on IBATIS-425:

There is some info somewhere on how to override some IBatis classes to get lazy loading of
sql maps (on a per sqlmap basis)  We have done this for our project and it works very well.

> Improving startup time (Dynamically loading SQL maps based on namespace)
> ------------------------------------------------------------------------
>                 Key: IBATIS-425
>                 URL: https://issues.apache.org/jira/browse/IBATIS-425
>             Project: iBatis for Java
>          Issue Type: Improvement
>          Components: SQL Maps
>    Affects Versions: 2.3.0
>         Environment: Windows XP/Oracle 10g
>            Reporter: Tyler Van Gorder
> We have a very large schema (400+ Tables) and we are using a code generator to create
SQLmaps and value objects for each table. This gives us a boiler plate map for CRUD operations
for every table in the system. The problem is that it is taking 11 seconds to parse/load all
the SQL maps. We had a similar problem when we used hibernate and eventually added a patch
to load the configuration dynamically as it was used for the first time in the application.
Why do we want to do this? Well, it significantly speeds up the development/unit testing cycle.
I know that 11 seconds is not horrible, but it does add up if you are running your unit tests
50-60 times a day * 5 developers.
> How hard would it be to add a "namespace" attribute in the sqlMap entries in the sqlMapConfig
and then read all SqlMap entries into a hashmap where the key is the names pace. Then as the
application asks for a statement/query from the SQLmap, if the name space of the statement
has not yet been loaded, parse the SQL MAP keyed to the name space.
> That way you get dynamic loading of the SQL maps as their name spaces are encountered
in the application.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message