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
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
Joshua
zodb
Commits
9b599fb9
Commit
9b599fb9
authored
Sep 06, 2002
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve (I *think*) the size estimates by at least filling in the
correct header sizes.
parent
932bb8b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/ZEO/TransactionBuffer.py
src/ZEO/TransactionBuffer.py
+3
-2
No files found.
src/ZEO/TransactionBuffer.py
View file @
9b599fb9
...
...
@@ -53,9 +53,10 @@ class TransactionBuffer:
self
.
pickler
.
dump
((
oid
,
version
,
data
))
self
.
count
+=
1
# Estimate per-record cache size
self
.
size
=
self
.
size
+
len
(
data
)
+
(
27
+
12
)
self
.
size
=
self
.
size
+
len
(
data
)
+
31
if
version
:
self
.
size
=
self
.
size
+
len
(
version
)
+
4
# Assume version data has same size as non-version data
self
.
size
=
self
.
size
+
len
(
version
)
+
len
(
data
)
+
12
def
invalidate
(
self
,
oid
,
version
):
self
.
pickler
.
dump
((
oid
,
version
,
None
))
...
...
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