Well, for the wire, I don't really care that much because almost every relay compresses the data anyway. So, the gain is minimum for all the conversion required.

But for the local db, I thought the biggest gains came from creating a "table" just for all the possible strings in tags + pubkeys + ids + addresses. Then, instead of having 32 or 64 bytes for each tag, we have 4 bytes for an Int, which would be more than enough to represent everything in a single-user db.

However, converting them back and forth for queries and so on becomes quite expensive.

But the savings are really 10-20x.

So, I tried some hashcode methods to avoid having to save a table and convert. That works, but collisions are way higher.

Reply to this note

Please Login to reply.

Discussion

No replies yet.