Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
141
Merge Requests
141
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
ece210ea
Commit
ece210ea
authored
Jan 15, 2013
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid a test in the inner loop.
parent
28ec6557
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
product/ZSQLCatalog/SQLCatalog.py
product/ZSQLCatalog/SQLCatalog.py
+9
-3
No files found.
product/ZSQLCatalog/SQLCatalog.py
View file @
ece210ea
...
...
@@ -240,6 +240,10 @@ class UidBuffer(TM):
tid
=
get_ident
()
self
.
temporary_buffer
.
setdefault
(
tid
,
[]).
extend
(
iterable
)
class
DummyDict
(
dict
):
def
__setitem__
(
self
,
key
,
value
):
pass
related_key_definition_cache
=
{}
related_key_warned_column_set
=
set
()
...
...
@@ -1545,6 +1549,9 @@ class Catalog(Folder,
if
method_id_list
is
None
:
method_id_list
=
self
.
sql_catalog_object_list
econtext
=
getEngine
().
getContext
()
if
disable_cache
:
argument_cache
=
DummyDict
()
else
:
argument_cache
=
{}
with
(
noReadOnlyTransactionCache
if
disable_cache
else
...
...
@@ -1646,7 +1653,6 @@ class Catalog(Folder,
LOG
(
'SQLCatalog'
,
WARNING
,
'Failed to call method %s on %r'
%
(
arg
,
object
),
error
=
sys
.
exc_info
())
value
=
None
if
not
disable_cache
:
argument_cache
[
argument_cache_key
]
=
value
append
(
value
)
kw
[
arg
]
=
value_list
...
...
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