You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Tyler Van Gorder (JIRA)" <ib...@incubator.apache.org> on 2007/05/03 19:51:15 UTC

[jira] Created: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)

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.


[jira] Commented: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)

Posted by "adamb (JIRA)" <ib...@incubator.apache.org>.
    [ 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.


[jira] Commented: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)

Posted by "Gabriele Garuglieri (JIRA)" <ib...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/IBATIS-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12498170 ] 

Gabriele Garuglieri commented on IBATIS-425:
--------------------------------------------

Can you provide some pointers on where this "somewhere" is? Do you have some some code samples you can share?

Thanks,  Gabriele

> 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.


[jira] Commented: (IBATIS-425) Improving startup time (Dynamically loading SQL maps based on namespace)

Posted by "Claus Ibsen (JIRA)" <ib...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/IBATIS-425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493915 ] 

Claus Ibsen commented on IBATIS-425:
------------------------------------

Great idea.

> 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.