Commit 0a4ebab
Add decode_zodb_record_for_pg for single-pass PG optimization
New Rust function that combines ZODB record decode + persistent ref
extraction + null-byte sanitization in one pass, eliminating two
separate Python-level tree walks. Returns (class_mod, class_name,
state_dict, refs_list) directly.
- collect_refs_from_pickle_value: pure Rust ref collector on PickleValue
- pickle_value_to_pyobject_pg: null-byte sanitization via @ns markers
- 8 new Rust unit tests, 9 new Python integration tests
- Decode path 2.5x faster (0.35ms → 0.14ms per 100 objects)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cfe99ee commit 0a4ebab
4 files changed
Lines changed: 413 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
77 | 113 | | |
78 | 114 | | |
79 | 115 | | |
| |||
116 | 152 | | |
117 | 153 | | |
118 | 154 | | |
| 155 | + | |
119 | 156 | | |
120 | 157 | | |
121 | 158 | | |
0 commit comments