Skip to content

Stream performance is different on mobile vs desktop #19

Description

@jamielockie

Hey folks,

Great library! Thank you very much 🙏

I'm using UseTextBuffer along with <StreamingText /> in an app. One thing that has surprised me is that on mobile devices, the stream seems to flow much faster than on desktop. Desktop performance is not problematic, but the mobile performance is extremely fast.

Has anyone else experienced this? Any ideas about why the performance might be different ?

I suspected it could even be CSS related, but haven't been able to find any obvious reasons...

Here's the relevant code — not much to it:

const {
    buffer,
    done: isBufferComplete,
    error,
  } = useTextBuffer({
    url: NEXT_API_CHAT_STREAM,
    throttle: 50,
    options: {
      method: 'POST',
    },
    data: messagesForServer,
  });
  
  ....
  
  <StreamingText buffer={buffer} />

Any insight would be much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions