Skip to content

~250ms startup on every command, even beeper version #70

Open

Description

@Ahmet-Dedeler

Hey, I moved my agents from a third-party Go wrapper (johntheyoung/roadrunner) to the official CLI today. It works well and covers a lot more, so thanks for building it.

One thing I noticed is that every command has a floor of about 250ms, even the ones that never touch the API:

command beeper 0.6.4 Go wrapper
version 254ms 7ms
messages search hello --json --limit 5 267ms 57ms

Median of 10 runs each, v0.6.4 from the Homebrew tap, macOS 27.3 on an M5 Max, Beeper Desktop 4.3.340.

So the API call itself is around 50ms and the rest is startup. The binary is a compiled Bun build (Bun v1.3.10, 113MB), and those can start a lot faster than this, so I guess something gets loaded on every run that most commands don't need (all the command modules, or the desktop-api SDK). I haven't profiled it though.

For a person typing commands it doesn't matter. But agents shell out one command at a time (list chats, then messages per chat, then a search), and 50 calls is about 10 seconds of startup alone. rpc avoids it if you write a client around it, but most agents won't.

Could the command modules be lazy-loaded so only the one being run is imported?

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions