Sign In Register

How can we help you today?

Start a new topic

RTSession Module Loading & Performance

Hi, in our game we have approximately 8 Modules used on our Realtime Script. Inside the RTScript at the beginning  we have initialized all modules with syntax:

var TestModule=require("Test");
var ModuleInstance= new TestModule(Global,Example,foo);

Inside modules the declaration is:

function Test(Global,Example,Foo)

Some Modules are relatively big (3k lines of code), when the code inside of the modules is running for the first time after the game is started, its really slow (approx 1-2sec for the first Invoke of function) after this delay, those modules run normally without bottlenecks.

Are there any methods/best practises to avoid said bottlenecks? It seems like the module isnt really loaded/cached inside the RTScript, even if we initialize every function and variable before iterating on it, but only when its used.

We are curious to know whats your take on this topic!


TD Games

Login to post a comment