[Erp5-report] r38267 kazuhiko - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTempl...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Sep 10 14:29:38 CEST 2010
Author: kazuhiko
Date: Fri Sep 10 14:29:37 2010
New Revision: 38267
URL: http://svn.erp5.org?rev=38267&view=rev
Log:
if SearchableText is joinned as it is, we use it for better performance.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml?rev=38267&r1=38266&r2=38267&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml [utf8] Fri Sep 10 14:29:37 2010
@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
- <tuple>
- <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
- <tuple/>
- </tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
@@ -82,7 +79,10 @@ def getRandomDocumentTextExcerpt(documen
\n
if document_text is None:\n
try:\n
- document_text = context.getSearchableText()\n
+ # if SearchableText is joinned as it is, we use it for better performance.\n
+ document_text = getattr(context, \'SearchableText\', None)\n
+ if not isinstance(document_text, (str, unicode)):\n
+ document_text = context.getSearchableText()\n
except NotConvertedError:\n
return context.Base_translateString("This document is not converted yet.")\n
\n
@@ -161,11 +161,14 @@ else:\n
<string>is_gadget_mode</string>
<string>getRandomDocumentTextExcerpt</string>
<string>None</string>
+ <string>getattr</string>
+ <string>isinstance</string>
+ <string>str</string>
+ <string>unicode</string>
<string>search_string</string>
<string>search_argument_list</string>
<string>found_text_fragments</string>
<string>map</string>
- <string>str</string>
<string>result</string>
<string>unicode_result</string>
</tuple>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=38267&r1=38266&r2=38267&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Fri Sep 10 14:29:37 2010
@@ -1 +1 @@
-1697
\ No newline at end of file
+1698
\ No newline at end of file
More information about the Erp5-report
mailing list