Index: trunk/web/main.py
===================================================================
--- trunk/web/main.py	(revision 247)
+++ trunk/web/main.py	(revision 248)
@@ -641,6 +641,7 @@
         operation = 'list'
 
-    main(operation, u, fields)
-    #import profile
-    #profile.run('main(operation, u, fields)', 'log-'+operation)
-
+    if os.getenv("SIPB_XEN_PROFILE"):
+        import profile
+        profile.run('main(operation, u, fields)', 'log-'+operation)
+    else:
+        main(operation, u, fields)
