Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
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
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
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
07e11994
Commit
07e11994
authored
Jun 24, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: small optimisation of askObject for most likely code path
parent
84f9894e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
neo/storage/handlers/client.py
neo/storage/handlers/client.py
+5
-9
No files found.
neo/storage/handlers/client.py
View file @
07e11994
...
@@ -45,16 +45,12 @@ class ClientOperationHandler(EventHandler):
...
@@ -45,16 +45,12 @@ class ClientOperationHandler(EventHandler):
app
.
queueEvent
(
self
.
askObject
,
conn
,
(
oid
,
serial
,
tid
))
app
.
queueEvent
(
self
.
askObject
,
conn
,
(
oid
,
serial
,
tid
))
return
return
o
=
app
.
dm
.
getObject
(
oid
,
serial
,
tid
)
o
=
app
.
dm
.
getObject
(
oid
,
serial
,
tid
)
if
o
is
None
:
try
:
logging
.
debug
(
'oid = %s does not exist'
,
dump
(
oid
))
p
=
Errors
.
OidDoesNotExist
(
dump
(
oid
))
elif
o
is
False
:
logging
.
debug
(
'oid = %s not found'
,
dump
(
oid
))
p
=
Errors
.
OidNotFound
(
dump
(
oid
))
else
:
serial
,
next_serial
,
compression
,
checksum
,
data
,
data_serial
=
o
serial
,
next_serial
,
compression
,
checksum
,
data
,
data_serial
=
o
logging
.
debug
(
'oid = %s, serial = %s, next_serial = %s'
,
except
TypeError
:
dump
(
oid
),
dump
(
serial
),
dump
(
next_serial
))
p
=
(
Errors
.
OidDoesNotExist
if
o
is
None
else
Errors
.
OidNotFound
)(
dump
(
oid
))
else
:
if
checksum
is
None
:
if
checksum
is
None
:
checksum
=
ZERO_HASH
checksum
=
ZERO_HASH
data
=
''
data
=
''
...
...
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