Skip to content

Reduce number of max assets in notes #2514

@PhilippGackstatter

Description

@PhilippGackstatter

The recent asset refactor increased the memory size of every note from 2048 to 3072 due to assets taking up 8 instead of 4 elements.

Instead of increasing this, we could probably just reduce the max number of assets per note (e.g., to something like 128).

In fact, we may want to reduce the max number of assets regardless to maybe even something that is relatively small (e.g., under 100), and in that case, we could reduce NOTE_MEM_SIZE to 1024.

Originally posted by @bobbinth in #2396 (comment)

I agree, so far the need for a large numer of assets hasn't even come up (to my knowledge), so something under 100 seems sufficient:

  • Current mem size: 44 (note metadata) + 256 assets * 8 elements = 2092
  • Mem size with 96 assets: 44 + 96 * 8 = 812
  • Mem size with 64 assets: 44 + 64 * 8 = 556

Maybe even 64 are sufficient, but I don't have a very strong opinion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kernelsRelated to transaction, batch, or block kernels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions