PDA

View Full Version : Difference loadEngine and loadEngineMinimal


smartboy
01-22-2007, 05:20 PM
Hi,
can somebody please explain what is exactly the difference between loadEngine and loadEngineMinimal.

What I understood so far:
loadEngine: I must point the method to lsengine.html with a config file where I set all the settings for the Engine (domain, host, port, dataadapter). The engine starts connected.

loadEngineMinimal: I point to the lsengine.html and with the method onEngineReady I set domain, host, port, dataadapter for the engine I started. The only difference is that I have to connect to the stream with lsEng.changeStatus("STREAMING") myself

Ok, when does loadEngineMinimal make sense and when does loadEngine?
Does loadEngineMinimal need lees memory / cpu!?
Why does the dojo-demo use loadEngineMinimal and not loadEngine? Would the demo not work with loadEngine?

Smartboy

Mone
01-23-2007, 12:09 PM
Hi,

You understand perfectly :)
In our API there are 3 ways to link a PushPage with an lsengine.html page; those methods are an extension of each other to make the stuff to do simpler.
In the order you find
setEngineReference (http://www.lightstreamer.com/docs/client_web_jsdoc/PushPage.html#setEngineReference) - loadEngine (http://www.lightstreamer.com/docs/client_web_jsdoc/PushPage.html#loadEngine) - loadEngineMinimal (http://www.lightstreamer.com/docs/client_web_jsdoc/PushPage.html#loadEngineMinimal)
btw, while the setEngineReference is still unique in his features and must be used in some cases (eg when you have more than one page with PushPage objects), loadEngine and loadEngineMinimal are completely equivalent.
The loadEngineMinimal was in fact introduced to avoid the needs for another js file (lsengine_config.js) in your application.

So:

Ok, when does loadEngineMinimal make sense and when does loadEngine?
As you prefer

Does loadEngineMinimal need less memory / cpu!?
No there aren't differences.

Why does the dojo-demo use loadEngineMinimal and not loadEngine? Would the demo not work with loadEngine?
Demos developed before the introduction of loadEngineMinimal make use of loadEngine, while newer demos use loadEngineMinimal, that's all.