[csw-devel] SF.net SVN: gar:[16993] csw/mgar/gar/v2/lib/python/models.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Feb 5 01:53:40 CET 2012


Revision: 16993
          http://gar.svn.sourceforge.net/gar/?rev=16993&view=rev
Author:   wahwah
Date:     2012-02-05 00:53:40 +0000 (Sun, 05 Feb 2012)
Log Message:
-----------
checkpkg: Add performance related comments

When querying for catalog metadata, the whole catalog gets unpickled, which is
woefully slow. These fields should be stored directly in tables to speed up
operations.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/models.py

Modified: csw/mgar/gar/v2/lib/python/models.py
===================================================================
--- csw/mgar/gar/v2/lib/python/models.py	2012-02-04 23:05:58 UTC (rev 16992)
+++ csw/mgar/gar/v2/lib/python/models.py	2012-02-05 00:53:40 UTC (rev 16993)
@@ -260,6 +260,13 @@
 
   def GetRestRepr(self):
     mimetype = "application/x-vnd.opencsw.pkg;type=srv4-detail"
+    # Slow subqueries, could be solved by caching in the db schema:
+    #  - self.pkginst.pkgname
+    #  - self.maintainer.full_name
+    #  - self.maintainer_email
+    #  - self.maintainer_id
+    #  - GetVendorUrl unpickles the object (very slow)
+    #  - GetSvnUrl unpickles the object (very slow)
     data = {
         'arch': self.arch.name,
         'basename': self.basename,

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list