I’d like to increase Defold open speed by not redownloading extensions that are up to date.
For instance most of the time they are hosted at GitHub which provides API to get latest commit info or release info. The extension URL can be parsed to check if master is requested or a release is requested and by invoking certain API we can check if there were any changes since the last fetch.
I also think an alternative solution to this problem would be to allow the user to skip fetching if they want to. Extensions don’t change all that often.
Also, yes, I can confirm that, at least on our end, Defold downloads the 60MB-ish FMOD extension every time we open the project.
Investigated a bit. It does look like there is indeed an issue with ETags and GitHub currently. The file is always downloaded from most GitHub library dependencies. Maybe there’s another way we can do the request, but we need to investigate further.
Since most extensions tend to be hosted on github, maybe if “github.com” is detected in the URL, you could do custom Github-specific stuff to check for cache busting, like commit hash, for example.
Can confirm that dependencies are always loaded for me too, even if there are no updates. There should probably be an option to skip fetching the libraries if the versions can’t be detected reliably.
luasec for example is 21-22MB in size, which gets downloaded every single time the editor is newly opened. Even with a fairly fast internet connection, this still slows down the editor start-up, and that’s just for 1 extension. Sometimes when downloading from github is unusually slow, I have to wait more than 10 minutes and then the editor just fails to open completely and will just auto-close for some reason.
Fow now, I had to copy local versions of my dependencies so the editor won’t have issues.