• Resolved csdsubscriber

    (@csdsubscriber)


    I have quite a large snippet that contains my main Application API functions. I’ve begun noticing when I first open it that it takes quite a while to become scrollable now.

    Is there a size limit for snippets I should be aware of? I’d rather keep the full API in a single file if at all possible but I don’t want to end up with any “gotchas” either.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Carolina

    (@carolinaop)

    Hi @csdsubscriber,

    Thanks so much for reaching out 🙂 There’s no snippet size limit you need to worry about in the plugin. Your snippet code is stored in a MySQL LONGTEXT column, which has a theoretical limit of around 4 GB. The plugin itself does not impose a maximum snippet size.

    The code editor (CodeMirror) should be the responsible for the delay you are experiencing . When you open a large snippet, it has to load the full content, build the document, and run syntax highlighting before the editor (and scrolling) is fully ready. The bigger the snippet, the longer that takes.

    Keeping one big “Application API” snippet: You can keep the full API in a single snippet. The tradeoff is editor performance (initial load and possibly typing) on the edit screen.

    I hope this helps clarify things! 😊

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.