Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Romain Courteaud
erp5_rtl_support
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
Hide 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):
...
@@ -240,6 +240,10 @@ class UidBuffer(TM):
tid
=
get_ident
()
tid
=
get_ident
()
self
.
temporary_buffer
.
setdefault
(
tid
,
[]).
extend
(
iterable
)
self
.
temporary_buffer
.
setdefault
(
tid
,
[]).
extend
(
iterable
)
class
DummyDict
(
dict
):
def
__setitem__
(
self
,
key
,
value
):
pass
related_key_definition_cache
=
{}
related_key_definition_cache
=
{}
related_key_warned_column_set
=
set
()
related_key_warned_column_set
=
set
()
...
@@ -1545,7 +1549,10 @@ class Catalog(Folder,
...
@@ -1545,7 +1549,10 @@ class Catalog(Folder,
if
method_id_list
is
None
:
if
method_id_list
is
None
:
method_id_list
=
self
.
sql_catalog_object_list
method_id_list
=
self
.
sql_catalog_object_list
econtext
=
getEngine
().
getContext
()
econtext
=
getEngine
().
getContext
()
argument_cache
=
{}
if
disable_cache
:
argument_cache
=
DummyDict
()
else
:
argument_cache
=
{}
with
(
noReadOnlyTransactionCache
if
disable_cache
else
with
(
noReadOnlyTransactionCache
if
disable_cache
else
readOnlyTransactionCache
)():
readOnlyTransactionCache
)():
...
@@ -1646,8 +1653,7 @@ class Catalog(Folder,
...
@@ -1646,8 +1653,7 @@ class Catalog(Folder,
LOG
(
'SQLCatalog'
,
WARNING
,
'Failed to call method %s on %r'
%
LOG
(
'SQLCatalog'
,
WARNING
,
'Failed to call method %s on %r'
%
(
arg
,
object
),
error
=
sys
.
exc_info
())
(
arg
,
object
),
error
=
sys
.
exc_info
())
value
=
None
value
=
None
if
not
disable_cache
:
argument_cache
[
argument_cache_key
]
=
value
argument_cache
[
argument_cache_key
]
=
value
append
(
value
)
append
(
value
)
kw
[
arg
]
=
value_list
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