meaningless optimizations.

This commit is contained in:
fiatjaf
2025-02-04 17:52:05 -03:00
parent 1e4848d84d
commit 0ccc1b8e9c
2 changed files with 13 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ func (evt *Event) CheckID() bool {
func (evt *Event) Serialize() []byte {
// the serialization process is just putting everything into a JSON array
// so the order is kept. See NIP-01
dst := make([]byte, 0)
dst := make([]byte, 0, 100+len(evt.Content)+len(evt.Tags)*80)
// the header portion is easy to serialize
// [0,"pubkey",created_at,kind,[