dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11798
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3459: Impl caching of category and section associations. Data entry loading of data sets a lot faster now.
------------------------------------------------------------
revno: 3459
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-04-24 13:04:14 +0200
message:
Impl caching of category and section associations. Data entry loading of data sets a lot faster now.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategory.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryCombo.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml
dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/Section.hbm.xml
dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategory.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategory.hbm.xml 2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategory.hbm.xml 2011-04-24 11:04:14 +0000
@@ -24,6 +24,7 @@
foreign-key="fk_dataelementcategory_conceptid" />
<list name="categoryOptions" table="categories_categoryoptions">
+ <cache usage="read-write" />
<key column="categoryid" />
<list-index column="sort_order" base="1" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementCategoryOption" column="categoryoptionid"
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryCombo.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryCombo.hbm.xml 2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryCombo.hbm.xml 2011-04-24 11:04:14 +0000
@@ -17,6 +17,7 @@
</property>
<list name="categories" table="categorycombos_categories">
+ <cache usage="read-write" />
<key column="categorycomboid" />
<list-index column="sort_order" base="1" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementCategory" column="categoryid"
@@ -24,6 +25,7 @@
</list>
<set name="optionCombos" table="categorycombos_optioncombos" inverse="true" cascade="all">
+ <cache usage="read-write" />
<key column="categorycomboid" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="categoryoptioncomboid"
foreign-key="fk_categorycombo_categoryoptioncomboid" unique="true" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml 2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOption.hbm.xml 2011-04-24 11:04:14 +0000
@@ -18,6 +18,7 @@
</property>
<set name="categoryOptionCombos" table="categoryoptioncombos_categoryoptions" inverse="true">
+ <cache usage="read-write" />
<key column="categoryoptionid" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo" column="categoryoptioncomboid"
foreign-key="fk_categoryoption_categoryoptioncomboid" />
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementCategoryOptionCombo.hbm.xml 2011-04-24 11:04:14 +0000
@@ -17,6 +17,7 @@
</property>
<list name="categoryOptions" table="categoryoptioncombos_categoryoptions">
+ <cache usage="read-write" />
<key column="categoryoptioncomboid" />
<list-index column="sort_order" base="1" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementCategoryOption" column="categoryoptionid"
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml 2011-04-12 13:25:06 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataelement/hibernate/DataElementOperand.hbm.xml 2011-04-24 11:04:14 +0000
@@ -6,6 +6,8 @@
<hibernate-mapping>
<class name="org.hisp.dhis.dataelement.DataElementOperand" table="dataelementoperand">
+ <cache usage="read-write" />
+
<id name="id" column="dataelementoperandid">
<generator class="native" />
</id>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2011-04-22 17:45:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/DataSet.hbm.xml 2011-04-24 11:04:14 +0000
@@ -26,6 +26,7 @@
not-null="true" foreign-key="fk_dataset_periodtypeid" />
<set name="dataElements" table="datasetmembers">
+ <cache usage="read-write" />
<key column="datasetid" />
<many-to-many class="org.hisp.dhis.dataelement.DataElement" column="dataelementid" foreign-key="fk_dataset_dataelementid" />
</set>
@@ -42,6 +43,7 @@
</set>
<set name="sections" order-by="sortorder" inverse="true" cascade="all">
+ <cache usage="read-write" />
<key column="datasetid" />
<one-to-many class="org.hisp.dhis.dataset.Section" />
</set>
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/Section.hbm.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/Section.hbm.xml 2011-04-14 08:52:58 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/org/hisp/dhis/dataset/hibernate/Section.hbm.xml 2011-04-24 11:04:14 +0000
@@ -17,12 +17,14 @@
<many-to-one name="dataSet" class="org.hisp.dhis.dataset.DataSet" column="datasetid" unique-key="key_sectionnamedataset" />
<list name="dataElements" table="sectiondataelements">
+ <cache usage="read-write" />
<key column="sectionid" />
<list-index column="sort_order" base="1" />
<many-to-many class="org.hisp.dhis.dataelement.DataElement" column="dataelementid" foreign-key="fk_section_dataelementid" />
</list>
<set name="greyedFields" table="sectiongreyedfields">
+ <cache usage="read-write" />
<key column="sectionid" />
<many-to-many class="org.hisp.dhis.dataelement.DataElementOperand" column="dataelementoperandid"
foreign-key="fk_section_dataelementoperandid" />
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2011-04-23 19:09:19 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/resources/ehcache.xml 2011-04-24 11:04:14 +0000
@@ -4,7 +4,7 @@
<diskStore path="java.io.tmpdir"/>
<defaultCache
- maxElementsInMemory="300000"
+ maxElementsInMemory="400000"
eternal="false"
timeToIdleSeconds="360"
timeToLiveSeconds="720"
@@ -63,6 +63,9 @@
<cache name="org.hisp.dhis.dataset.Section"
maxElementsInMemory="400"/>
+ <cache name="org.hisp.dhis.dataelement.DataElementOperand"
+ maxElementsInMemory="4000"/>
+
<cache name="org.hisp.dhis.expression.Expression"
maxElementsInMemory="200"/>
@@ -117,6 +120,35 @@
<cache name="org.hisp.dhis.document.Document"
maxElementsInMemory="100"/>
+ <!-- Hibernate Associations -->
+
+ <cache name="org.hisp.dhis.dataelement.DataElementCategoryCombo.categories"
+ maxElementsInMemory="300"/>
+
+ <cache name="org.hisp.dhis.dataelement.DataElementCategoryCombo.optionCombos"
+ maxElementsInMemory="500"/>
+
+ <cache name="org.hisp.dhis.dataelement.DataElementCategory.categoryOptions"
+ maxElementsInMemory="300"/>
+
+ <cache name="org.hisp.dhis.dataelement.DataElementCategoryOption.categoryOptionCombos"
+ maxElementsInMemory="500"/>
+
+ <cache name="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo.categoryOptions"
+ maxElementsInMemory="500"/>
+
+ <cache name="org.hisp.dhis.dataset.DataSet.dataElements"
+ maxElementsInMemory="4000"/>
+
+ <cache name="org.hisp.dhis.dataset.DataSet.sections"
+ maxElementsInMemory="400"/>
+
+ <cache name="org.hisp.dhis.dataset.Section.dataElements"
+ maxElementsInMemory="4000"/>
+
+ <cache name="org.hisp.dhis.dataset.Section.greyedFields"
+ maxElementsInMemory="1000"/>
+
<!-- Hibernate Query Cache -->
<cache name="org.hibernate.cache.StandardQueryCache"