deno: `deno --watch` is very slow in Docker

I have two projects that use deno --watch:

Project 1 - When making file changes, app restarts pretty much instantly

Project 2 - When making file changes, app can take from 1s to 31.59s to restart, all whilst i’m sitting there doing nothing, watching the terminal for 30+ seconds.

The difference between the two projects is project 2 is a lot larger. Not sure what causes the restart process to take a looong time

Project 1: https://github.com/ebebbington/chatsterisk Project 2: https://github.com/drashland/deno-drash-realworld-example-app

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (25 by maintainers)

Most upvoted comments

Closing, seems the issue was fixed form 1.5.1 to 1.5.4, as the ddeno version used in that problamatic repo was using 1.5.1, so i upgraded and the detecting was instant - so it isn’t a problem with deno. Sorry if i wasted anyone’s time!

Taking a quick look at notify issues, there seems no issue about this.

@ebebbington What’s your host OS? macOS?

Yeah, high sierra 10.13.6

It is actually instant for the watcher to restart the app when i make a change outside of docker

So it’s a problem with Docker env 😬 I’m not sure we can do anything about it, it boils down to notify crate we use for that purpose.

Thanks for the detailed info. That looks really strange… the watcher has some quirk when working with docker 😕 I will look into it.

@bartlomieju what does a “cold start” mean? sorry

I’m guessing you mean how long the takes for the app to start - which i will check now just in case that is what you mean

Yeah I meant just running the project using deno run