Commit 4a2e350
committed
temp: Store messages primarily by their signed ID
This change moves our position in an impactful trade-off space in a direction that we will not want to pursue long-term. It does, however, provide significant (as much as 2x, depending on circumstances) performance improvements that are valuable until PR #391 hits.
Prior to this commit, the `hb_cache` system referenced all messages via their uncommitted ID, which is linked to from all committed IDs. Each commitment was then stored in the `commitments` key of this message.
Upside: A consequence of this design is that reading one ID for a message (whether signed or unsigned) leads to all of the known commitments being available for use. Downside: This design reads _all_ commitments into memory every time a single message is read.
While sometimes useful, this is not desirable behavior in all cases. #391 moves us forward with a long-term fix, but until that hits `edge` this PR provides immediate performance relief, while also leading to a modest increase in the size of caches.1 parent 61c4c8d commit 4a2e350
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
| 237 | + | |
| 238 | + | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
| 255 | + | |
| 256 | + | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
| 262 | + | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| |||
0 commit comments