Changeset 1895 for WAeUP_SRP/trunk


Ignore:
Timestamp:
14 Jun 2007, 04:13:33 (18 years ago)
Author:
Henrik Bettermann
Message:

was very slow in live system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1890 r1895  
    139139        pxtool = getToolByName(self, 'portal_proxies')
    140140        pxtool_infos = pxtool.getRevisionsUsed()
    141        
     141
    142142        nb_revs = 0
    143143        docids_d = {} # all docids
     
    146146        ids_unused_revs = [] # ids for unused revs
    147147        total = 0
    148         for id in repository.objectIds():
     148        idlist = repository.objectIds()
     149        for id in idlist:
    149150            docid, rev = repository._splitId(id)
    150151            if docid is None:
     
    165166                total += max
    166167                logger.info('removed %d total %d unused docids ' % (max,total))
    167         anz = len(ids_unused_revs) 
     168        anz = len(ids_unused_revs)
    168169        if anz > 0:
    169170            repository.manage_delObjects(ids_unused_revs)
     
    171172            total += anz
    172173            logger.info('finished removing %d unused docids ' % (total))
    173            
     174
    174175
    175176###)
Note: See TracChangeset for help on using the changeset viewer.