You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
my ags takes quite a long time to start, 5-7 seconds,
I have a gjs script that switches options in modules and after that ags should restart.
Is it possible to somehow load some modules lazily or change module options in ags without restarting it?
The text was updated successfully, but these errors were encountered:
sounds like you have some expensive blocking operation that should be reworked
load some modules lazily
making use of the bundler you can do something like this
// a.jsconsole.log("some very heavy operation")exportconstvalue="value";
// b.jsasyncfunctiongetValue(){const{ value }=awaitimport("./a.js")// load the module async}
but if you statically import it in any module, it will still be evaluated at startup though
import{value}from"./a.js"
all this does is just wrap your module in a function, which might not be what you want
since you did not provide much context, my guess is you have some exec("heavy-operation") that takes too long, you should use execAsync instead.
If all you want to do is to change some values at runtime you can use the cli client
my ags takes quite a long time to start, 5-7 seconds,
I have a gjs script that switches options in modules and after that ags should restart.
Is it possible to somehow load some modules lazily or change module options in ags without restarting it?
The text was updated successfully, but these errors were encountered: