Changeset 2041 for pykota/trunk

Show
Ignore:
Timestamp:
01/24/05 18:35:24 (20 years ago)
Author:
jalet
Message:

Performance improvement for user print quota entries search

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2040 r2041  
    2222# 
    2323# $Log$ 
     24# Revision 1.98  2005/01/24 17:35:24  jalet 
     25# Performance improvement for user print quota entries search 
     26# 
    2427# Revision 1.97  2005/01/24 17:27:35  jalet 
    2528# typo 
     
    15201523            uname = extractonly.get("username") 
    15211524            for entry in entries : 
    1522                 for (user, userpquota) in self.getPrinterUsersAndQuotas(entry) : 
    1523                     if (uname is None) or (user.Name == uname) : 
    1524                         result.append((user.Name, entry.Name, userpquota.ident, user.ident, entry.ident, userpquota.LifePageCounter, userpquota.PageCounter, userpquota.SoftLimit, userpquota.HardLimit, userpquota.DateLimit)) 
     1525                for (user, userpquota) in self.getPrinterUsersAndQuotas(entry, names=[uname or "*"]) : 
     1526                    result.append((user.Name, entry.Name, userpquota.ident, user.ident, entry.ident, userpquota.LifePageCounter, userpquota.PageCounter, userpquota.SoftLimit, userpquota.HardLimit, userpquota.DateLimit)) 
    15251527            return result 
    15261528