Running Many Small Scripts

Running many small scripts is faster then loading a BIG combined script. This is because the engine returns faster loading a small script and can move on to the next. If the engine has to sit there and load a BIG script its going to hang until it completes that action.

If you HAVE to use BIG scripts or want to combine scripts into one because that is what your design strategy needs I understand and I got the solution.

Combining Scripts

Monkeyspeak gives you 2 methods to load a script into another existing Page.
These are:
LoadFromString(ref Page existingPage, string chunk)
LoadFromStream(ref Page existingPage, Stream stream)
Combining scripts can lead to hanging (see Running Many Scripts) but if you compile them then later you can load them a lot faster many times each.

Compile Compile Compile!

If you need to load a BIG script, compile it before loading it as this reduces the load time A LOT! (see Compiling Scripts)

Default Libs

Even Monkeyspeak's default libraries are not optimized as well as they could be and that is one of my todos. Keep this in mind when using them.

Last edited Sep 10, 2012 at 1:44 AM by Squizzle, version 1


No comments yet.