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
ec9f5c8f
Commit
ec9f5c8f
authored
Sep 25, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor optimzation, caching the cach's update method in a loop.
parent
45cca84a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/ZEO/ClientStorage.py
src/ZEO/ClientStorage.py
+3
-2
No files found.
src/ZEO/ClientStorage.py
View file @
ec9f5c8f
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
##############################################################################
##############################################################################
"""Network ZODB storage client
"""Network ZODB storage client
"""
"""
__version__
=
'$Revision: 1.2
0
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
1
$'
[
11
:
-
2
]
import
struct
,
time
,
os
,
socket
,
string
,
Sync
,
zrpc
,
ClientCache
import
struct
,
time
,
os
,
socket
,
string
,
Sync
,
zrpc
,
ClientCache
import
tempfile
,
Invalidator
,
ExtensionClass
,
thread
import
tempfile
,
Invalidator
,
ExtensionClass
,
thread
...
@@ -498,6 +498,7 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
...
@@ -498,6 +498,7 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
seek
=
tfile
.
seek
seek
=
tfile
.
seek
read
=
tfile
.
read
read
=
tfile
.
read
cache
=
self
.
_cache
cache
=
self
.
_cache
update
=
cache
.
update
size
=
tfile
.
tell
()
size
=
tfile
.
tell
()
cache
.
checkSize
(
size
)
cache
.
checkSize
(
size
)
seek
(
0
)
seek
(
0
)
...
@@ -515,7 +516,7 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
...
@@ -515,7 +516,7 @@ class ClientStorage(ExtensionClass.Base, BaseStorage.BaseStorage):
"Unexpected end of file in client storage "
"Unexpected end of file in client storage "
"temporary file."
"temporary file."
)
)
cache
.
update
(
oid
,
s
,
v
,
p
)
update
(
oid
,
s
,
v
,
p
)
i
=
i
+
14
+
vlen
+
dlen
i
=
i
+
14
+
vlen
+
dlen
seek
(
0
)
seek
(
0
)
...
...
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