denoland / deploy_feedback

For reporting issues with Deno Deploy
https://deno.com/deploy
74 stars 5 forks source link

[Bug]: NodeJS Compat Extremely Slow #737

Open wesbos opened 2 weeks ago

wesbos commented 2 weeks ago

Problem description

I've ping'd the chat, but I thought I'd make a formal issue to log everything.

Seems the Node.js compat on Deno Deploy is very slow.

I tried deploying my Express app, and I experienced this slowness:

  1. Initial deploy took about 50 minutes. Subsequent deploys took ~5-7 mins. I think it's around 400mb when bundled.
  2. Isolate Start Times were wildly different - seeing between 3 and 6 seconds.
  3. uncached Application response time is also all over from 74ms up 6 seconds. I usually see ~400ms on render Node.js Hosting
  4. Assets - images, JS, CSS are all very slow. Some 50k images took 10 seconds.

image

I also checked the Next.js deployment from this tweet: https://x.com/deno_land/status/1849469080257900704 at https://my-app-96.deno.dev/ and I'm seeing the same issues: 11 seconds to load 50k of JavaScript for example

Screenshot 2024-10-25 at 2 49 04 PM

I've confirmed its not just me by having a co-worker test and I don't see the same issues on Deno sites like Fresh, docs or JSR.

Is this an issue with the Node.js Compat on Deploy? Locally my apps on Deno run great.

Steps to reproduce

  1. Deploy Node.js code to Deno Deploy
  2. Observe slowness

Expected behavior

its not slow

Environment

Deno 2.0 locally. whatever Deno dEploy is running? I could not find this info.

Possible solution

No response

Additional context

No response

wesbos commented 2 weeks ago

Maybe not related to just Node.js?

https://github.com/denoland/deploy_feedback/issues/505 https://github.com/denoland/deploy_feedback/issues/638

wesbos commented 1 week ago

Update from the Discord - they rolled out some improvements Yesterday and now I'm seeing it be significantly faster once warm - faster than my Render VM running Node.