Skip to content

Large documents in persistant memory #15

Open

Description

@linusrj

After implementing #12 it was discovered that larger GUI documents could not be stored in the persistant flash memory. This is due to a known limitation:

String values are currently limited to 4000 bytes. This includes the null terminator. Blob values are limited to 508,000 bytes or 97.6% of the partition size - 4000 bytes, whichever is lower.

This means that larger GUI documents than 4000 bytes are not going to be able to be stored upon uploading remotely.
The workaround for this is to hard-code the large GUI when compiling a sketch, and passing it to mgui_init().

This limitation is not necessarily a big issue that needs to be solved, but it could be a good idea to implement a smart workaround for this so that the user gets a better experience using MicroGUI.

Activity

  1. added
    help wanted
    on Jul 28, 2022
  2. linusrj commented on Jul 28, 2022

    @linusrj
    CollaboratorAuthor

    If support is implemented for multiple pages in one GUI document, then this issue might be easy to solve.
    Let's say that the web app gets a little bit smarter and chops large pages into 4000 byte strings and name these something like main_1 and main_2 and so on if they belong to pages that are larger than 4000 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions