Not sure if this is a real issue, but I thought I'd open a discussion around how long creating an agent takes.
Creation of a BSkyAgent takes over 112ms on my Macbook M1.
console.time('start'); import { BskyAgent } from "@atproto/api"; const agent = new BskyAgent({ service: "https://bsky.social" }); console.timeEnd("start");
This code isn't hitting the network, it's simply the initialization of the class.
I ran into this issue trying to use this library on Cloudflare workers, which limits your requests to 10ms CPU time.
They also offer 200ms script startup, and 50ms CPU time on pro plans. Both would go over.
Deno deploy has the same 10ms free, 50ms paid limitations.
So, is there anything that can be done to decrease this time? Or is the answer to just use a service that allows for longer run times?