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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
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