Skip to content

BootstrapHandler.writeBootstrapPage uses (default) 8192 bytes buffer, this causes buffer flushing to occur pretty often. #2222

Not planned

Description

@fluorumlabs

With UIDLs tending to be quite big for complex applications (let's say 100k-300k), the default buffer size in BootstrapHandler.writeBootstrapPage causes buffer flushes way too often, which degrades the performance.

2222get btw

Activity

  1. Legioth commented on Aug 23, 2017

    @Legioth
    Member

    A good question is how to determine the buffer size to use. Should it always be the same, or somehow depend on the payload size? Whatever we do should also be quantified by actual performance measurements of how big impact any change has on the total time for handling a request.

  2. fluorumlabs commented on Aug 23, 2017

    @fluorumlabs
    ContributorAuthor

    I would say it should probably be at least around the nominal bootstrap page size (which is >20k). May I suggest 131072 bytes to be on the safe side?

  3. pleku commented on Aug 29, 2017

    @pleku

    Let's use the buffer size of whatever is the string length, and add a upper limit to 128k.

    We can make it configurable later on.

  4. added this to the Candidates milestone on Oct 4, 2018
  5. totally-not-ai commented on Dec 5, 2026

    @totally-not-ai
    Contributor

    Closing as outdated: the bootstrap page is now served by IndexHtmlRequestHandler, which writes the page in one go rather than through the BootstrapHandler writer discussed here.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions