ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Van Gorder (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)
Date Thu, 03 May 2007 17:51:15 GMT
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.


Mime
View raw message