Changeset 261 for trunk


Ignore:
Timestamp:
Jan 12, 2010, 2:32:28 PM (15 years ago)
Author:
gav
Message:

Improve bulk data creation batch times and use dynamic allocation of next available id, take 2.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/CreateBulkDataService.groovy

    r258 r261  
    1818    def propertyInstanceMap = org.codehaus.groovy.grails.plugins.DomainClassGrailsPlugin.PROPERTY_INSTANCE_MAP
    1919
    20     def startTime = System.currentTimeMillis()
    21     def lastBatchStarted = startTime
     20    def startTime
     21    def lastBatchStarted
    2222
    2323/*******************************************
     
    8888        def personInstance
    8989
    90         def range = 1..1000
     90        def start = Person.count() + 1
     91        def end = start + 100
     92
     93        def range = start..end
    9194
    9295        def loginName = "BtLoginName"
     
    137140        def p = [:]
    138141
    139         def range = 0..40000
     142        def start = Task.count() + 1
     143        def end = start + 10000
     144
     145        def range = start..end
    140146
    141147
     
    150156        def today = dateUtilService.today
    151157
     158        startTime = System.currentTimeMillis()
     159        lastBatchStarted = startTime
     160
    152161        range.each() {
    153162
    154             if(it % 1000 == 0) {
     163            if(it % 100 == 0) {
    155164                logStatus("Creating task #" + it)
    156165                cleanUpGorm()
Note: See TracChangeset for help on using the changeset viewer.