Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
Nicolas Wavrant
ZODB
Commits
cd31bdd7
Commit
cd31bdd7
authored
Apr 05, 2011
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Inlining a common case gives another 1% improvement in load CPU. Not
much, but I'll take it. :)
parent
0fb31c06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/ZEO/zrpc/smac.py
src/ZEO/zrpc/smac.py
+9
-1
No files found.
src/ZEO/zrpc/smac.py
View file @
cd31bdd7
...
@@ -266,7 +266,15 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
...
@@ -266,7 +266,15 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
while
(
size
<=
SEND_SIZE
)
and
messages
:
while
(
size
<=
SEND_SIZE
)
and
messages
:
message
=
messages
[
0
]
message
=
messages
[
0
]
if
message
.
__class__
is
str
:
if
message
.
__class__
is
str
:
size
+=
self
.
__message_output
(
messages
.
pop
(
0
),
output
)
if
self
.
__hmac_send
:
size
+=
self
.
__message_output
(
messages
.
pop
(
0
),
output
)
else
:
# inline common case
lmessage
=
len
(
message
)
output
.
append
(
struct
.
pack
(
">I"
,
lmessage
))
output
.
append
(
messages
.
pop
())
size
+=
4
+
lmessage
elif
message
is
_close_marker
:
elif
message
is
_close_marker
:
del
messages
[:]
del
messages
[:]
del
output
[:]
del
output
[:]
...
...
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