Improving Iguana Editor performance

Faster Editor code execution

Contents

The ‘iguana’ namespace has two helpful functions for dealing with scripts that can be slow: iguana.isTest() and iguana.setTimeout()

iguana.isTest() will return true if the code is running in the context of the editor. iguana.setTimeout() allows you to specify a different timeout than the default of 5 minutes for when the channel is in production.

So for example say you had a batch interface then within the code you could modify the execution to only process the first 10 messages instead of say 1000 if iguana.isTest() returns true.

You can use iguana.setTimeout() to set a shorter timeout than the default 5 minutes for editor code:

This makes the editor much more responsive and will speed up your interface development process.

Tip: If a live channel is timing out before the code executes you may want to use iguana.setTimeout() to set a longer timeout than the default 5 minutes, to help debug the code. For example if you give the code more time it could log a useful error message.

Leave A Comment?