Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Why swapRoute.ts soooooo slow? #5

Open
kevgithub opened this issue Jan 8, 2024 · 0 comments
Open

Why swapRoute.ts soooooo slow? #5

kevgithub opened this issue Jan 8, 2024 · 0 comments

Comments

@kevgithub
Copy link

When I run swapRoute.ts in nodejs, it might cost 2 minutes, and I check the code, most time spent at those code:

const sPool: ApiPoolInfo = await formatAmmKeysToApi(PROGRAMIDS.AmmV4.toString(), true)

any suggestion?

also I get this error sometimes:

Error: 500 Internal Server Error: {"jsonrpc":"2.0","id":"7b40fc89-75f4-482f-8e78-8a5cd8cb6797","error":{"code":-32603,"message":"Internal server error"}}

I use the alchemy RPC node:

const RPC_MAINET = 'https://solana-mainnet.g.alchemy.com/v2/UZlhPRTS....';
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant