Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The build time to launch is longer than in the Defold Editor #33

Open
RisingSunStudios opened this issue Sep 29, 2023 · 7 comments
Open

Comments

@RisingSunStudios
Copy link

RisingSunStudios commented Sep 29, 2023

Hi!

Great extension! Seems to take a little longer to launch the games than when launching from the editor and I'm noticing every launch the output show this message:

No engine found at 'h:\Defold\proj-space-game\SpaceGame\build\x86_64-win32\dmengine.exe', extracting from the Defold to 'h:\Defold\proj-space-game\SpaceGame\build\launcher\dmengine.exe'

Seems to always be looking in "x86_64-win32" but then installs the engine to "launcher" so it will never find it where it first looks.

The game launches but presumably this may be affecting launch times a little?

@astrochili
Copy link
Owner

astrochili commented Sep 29, 2023

Hi!

Log messages No engine found at... are okay. This happens when there are no dependencies with C++ extensions in the project and the engine is not built on the Defold server, so there is no "vanilla" engine in the build folder and it is necessary to extract it from Defold Editor resources. When you add the first native extension, the engine file will appear in this path.

Perhaps the message could be made friendlier to not so fluffy 😃.

Unfortunately, this is not a reason of the game taking longer to launch. The reason is the difference between the build in the editor and the build with a bob.jar. The editor caches something cleverly and probably does something else I don't know about. It's a good point to ask the Defold team about the difference and maybe find ways to implement similar behaviour, I'll do it 👌

@astrochili
Copy link
Owner

If you don't mind, I'll rename the ticket so I don't lose the idea.

@astrochili astrochili changed the title No engine found at x86_64 The build time is longer than in the Defold Editor. Sep 29, 2023
@astrochili astrochili changed the title The build time is longer than in the Defold Editor. The build time to launch is longer than in the Defold Editor. Sep 29, 2023
@astrochili astrochili changed the title The build time to launch is longer than in the Defold Editor. The build time to launch is longer than in the Defold Editor Sep 29, 2023
@astrochili astrochili added the help wanted Extra attention is needed label Sep 29, 2023
@astrochili
Copy link
Owner

What I found out.

Monitoring of changed files is not difficult to implement in VS Code. But at the moment there is no functionality in bob for partial build to pass this files list there. Thus, for a quick build, there is no solution other than building from the editor.

@andrewprock
Copy link

Can it help to allow the number of threads to be set using --max-cpu-threads?

@astrochili
Copy link
Owner

Can it help to allow the number of threads to be set using --max-cpu-threads?

Did you try, does it help?

@andrewprock
Copy link

I'm trying to figure out where that would be added in the extension. I think that would go into out/extension.js, but that looks like minified js code, and I'm not sure that makes sense.

@astrochili
Copy link
Owner

astrochili commented Jun 21, 2024

Ah, of course. There's really no need to touch the minified code. All you need to do to check the edits is to download this repository, open it in VSCode, make the edits, and press Run and Debug. It will open VSCode window with the debuggable extension connected where you can open your Defold project.

For example, you can add your launch argument here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants