[csw-devel] SF.net SVN: gar:[21029] csw/mgar/gar/v2/lib/web/pkgdb_web.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Wed May 8 13:35:49 CEST 2013


Revision: 21029
          http://gar.svn.sourceforge.net/gar/?rev=21029&view=rev
Author:   wahwah
Date:     2013-05-08 11:35:48 +0000 (Wed, 08 May 2013)
Log Message:
-----------
pkgdb-web: Disable returning full package data

When getting data for the whole catalog, it's not feasible to return full
package metadata, the amount of data is too large, and the whole thing is too
slow.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/web/pkgdb_web.py

Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-05-07 13:15:17 UTC (rev 21028)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py	2013-05-08 11:35:48 UTC (rev 21029)
@@ -303,12 +303,11 @@
     sqo_osrel, sqo_arch, sqo_catrel = models.GetSqoTriad(
         osrel_name, arch_name, catrel_name)
     pkgs = list(models.GetCatPackagesResult(sqo_osrel, sqo_arch, sqo_catrel))
-    user_data = web.input(quick='')
-    quick = (user_data.quick == "true")
     if not len(pkgs):
       raise web.notfound()
     web.header('Content-type', 'application/x-vnd.opencsw.pkg;type=srv4-list')
-    pkgs_data = [p.GetRestRepr(quick)[1] for p in pkgs]
+    # We never want to return complete data for every object (too slow).
+    pkgs_data = [p.GetRestRepr(quick=True)[1] for p in pkgs]
     return cjson.encode(pkgs_data)
 
 

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