Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
d13a82fb
Commit
d13a82fb
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
1cf0ba98
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 @
d13a82fb
...
@@ -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