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
edcc4bcb
Commit
edcc4bcb
authored
Feb 20, 2013
by
Marius Gedminas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explain the cache size numbers in greater detail
parent
020c6c18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
src/ZODB/tests/testCache.py
src/ZODB/tests/testCache.py
+11
-1
No files found.
src/ZODB/tests/testCache.py
View file @
edcc4bcb
...
@@ -463,7 +463,17 @@ mapping that is our root object and see its estimated size
...
@@ -463,7 +463,17 @@ mapping that is our root object and see its estimated size
pickletools.dis(conn._storage.load(conn.root._root._p_oid)[0]))
pickletools.dis(conn._storage.load(conn.root._root._p_oid)[0]))
to see the differences.
to see the differences in the first pickle (encoding the object class).
and
pickletools.dis(conn._storage.load(conn.root._root._p_oid)[0][N:]))
to see the differences in the second pickle (encoding the object state,
here N is the length of the first pickle).
These sizes are then rounded up to a multiple of 64, to fit in a
24-bit field for obscure reasons having to do with C structure size
BBB due to evil packages shipping their own copies of cPersistence.h.
We add some data and the cache grows:
We add some data and the cache grows:
...
...
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