In
this month's Dr. Scripter, we discuss the 4.40 release of
the ScriptEase:ISDK/C engine, answering these two questions: How
does 4.40 differ from 4.30? and Should I switch to 4.40 from 4.30?
How does 4.40 differ from 4.30?
The two primary changes with
4.40 are improvements in memory use for small devices, and the introduction
of fibers for high-performance server environments.
Improved Memory Use: For
devices with limited overall memory (and for server systems that
may be running hundreds of scripts or instances of the engine),
many of the internal structures and algorithms have been tweaked
to use less memory overall. We have always concentrated on memory
conservation, and 4.40 takes that to a new level.
Extended Memory Options: For systems that support
some form of extended memory (i.e. memory outside the standard malloc-like
allocation heap), 4.40 can use that extended memory to handle large
scripts and libraries, caching recently-used memory objects for
performance, and going to extended memory as needed.
Fibers: With 4.40, a new type of "jsecontext"
is now available: a "fiber context". Multiple fiber contexts
can share globals, share in the garbage collection, and share scripts,
so that very many virtual contexts can be running simultaneously.
Fibers use up much less memory than true threads, and switching
between them is much faster than threads. And programming / scripting
between fibers is easier than with threads because switching can
only occur at safe times. So with fibers a server can be written
to handle simultaneous scripts (e.g. events, connections, requests,
etc...) with very good response, much faster, smaller, and easier
than using true threads for the same purpose.
Should
I switch from 4.30 to 4.40?
If you are short on memory, then yes you should
switch use 4.40 for its memory enhancements. For example, with the
PalmOS 4.40 release the engine can be running, with all of the standard
ECMA objects, script loaded, and hundreds of objects instantiated,
and still use about 20K of heap memory.
If you need the fastest response among many events,
then yes you should switch to 4.40 for its fiber capabilities.
An application server handling multiple requests could get no faster
response than with fibers.
If you are not close to releasing with 4.30, then
yes you should switch to 4.40. Release 4.40 has received internal
testing and been in trial use for more than a year, and has received
the bulk of our development efforts.
Otherwise stay with 4.30. We will continue to
support 4.30 and provide bug-fix releases to 4.30.
Where do I get version
4.40?
Version 4.40 is available
for PalmOS now, and we will be preparing releases for other
operating systems in the coming week. A message will go out to this
list when the 4.40 releases are available.
Have
a question about how to use ScriptEase:ISDK? Let Dr. Scripter know
at http://support.nombasxxx.com/.
|