Preview Launch extremely slow since Monaco introduction due to "Validating Scripts" phase

Not favoritedFavorited Favorited 0 favourites
  • 8 posts
From the Asset Store
Launch your player into space and watch out for the Asteroids!
  • Since Monaco was introduced in Construct 3 in recent updates, each preview launch of my game takes an additional 10 seconds to launch. (20 seconds in total)

    This is due to the new "Validating Scripts" phase (which last 10 seconds)

    Before Monaco, launching the preview of my game was approx 10 seconds, now its 20 seconds and it is really a threshold that is too annoying to work with.

    Any reason why this is so much slower versus when CodeMirror was used?

    I don't even use the builtin editor so all this friction seem very unnecessary,

    would it be possible to add an option boolean to completely skip this phase? (maybe that boolean should also disable the possibility to open a script file as a C3 tab)

    Maybe it could be a "Use External Editor for Script Files" option?

  • Ashley Can anything be done to completely dismiss this new long "Validating Scripts" phase? Especially for projects that use external script editors?

  • I assumed this step would only take a fraction of a second and I'm surprised it would take that long. Could you share your project so I could take a look?

  • I'm not confortable with sending the project files, I didn't find a super minimal repro yet and I'm on a tight schedule right now, but if i find how to reproduce it at some point i'll fill a bug report.

    It looks like this is a "real world project issue" when a project has a lot of scripts, maybe it is related to scripts referencing each other, i don't know yet

    For now i stick to r429 to use CodeMirror and avoid the extra 10 seconds to launch the preview due to the "Validating Scripts" phase introduced with Monaco

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't even use the builtin script editor, so it is really frustratring that C3 forces me to wait for some validation i don't need, even if that time was optimized to only take 2 second instead of 10, it still wouldn't be ideal. (I launch the preview dozens and dozens of time per day, and it is still taking 10 seconds in previous versions instead of 20+ with Monaco)

    What is your opinion about adding an option "Use External Script Editor" to skip this phase? (This option could also be useful for potential extra UX enhacements such as suggesting to open the script with default app when double clicking it instead of opening it in C3 editor)

  • I'd want to see a real project showing this happening first. It's normally very fast - fast enough that it can validate a large file as you type, so even with a large amount of code it ought to be OK, but perhaps not, or perhaps there's some kind of fault happening. If it's confirmed that it is just pretty slow in some cases then maybe we could think about ways to optimize it, or even a setting to just entirely bypass it, but I'd still want to check in case there is something simple that can be done to take it from 10 seconds to <1 second, and then we don't need any other measures.

  • For reference, Command & Construct is over 8000 lines of code, and full TypeScript validation takes <1 second for me after the first preview (the first takes longer as it warms up caches and such, which is normal and to be expected - regular previews afterwards are faster).

  • Fair enough! I'll try to dig into this again when i have some time!

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)