Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
351988f6
Commit
351988f6
authored
Jul 24, 2010
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid key calculation overhead for fast queries
parent
b0b04404
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/Products/ZCatalog/CatalogReport.py
src/Products/ZCatalog/CatalogReport.py
+5
-2
No files found.
src/Products/ZCatalog/CatalogReport.py
View file @
351988f6
...
...
@@ -187,13 +187,16 @@ class CatalogReport(StopWatch):
self
.
log
()
def
log
(
self
):
key
=
make_key
(
self
.
catalog
,
self
.
request
)
# result of stopwatch
res
=
self
.
result
()
if
res
[
0
]
<
self
.
threshold
:
return
# The key calculation takes a bit itself, we want to avoid that for
# any fast queries. This does mean that slow queries get the key
# calculation overhead added to their runtime.
key
=
make_key
(
self
.
catalog
,
self
.
request
)
reports_lock
.
acquire
()
try
:
if
self
.
cid
not
in
reports
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment