Please enable JavaScript to view this site.

ESL Documentation

The cache is the part of RAM used to hold the portion of the bitmap image that persists between display requests. The data in the cache is uncompressed, scaled, and color mapped, and thus is immediately ready for display.

The cache specifications allow you to control how much memory ESL uses for image regions, from potentially a lot in the case of a cache image, to as little as desired in the case of a work area cache. You can choose from four cache specifications:

cache image,

cache viewport,

work area cache (cache n bytes),

and no cache.

The first three use program memory; no cache uses system memory.

Cache Image

A cache image contains the entire image from the bitmap file, scaled according to the window to viewport translation. It normally takes several seconds for the first display of an image while ESL gets the entire image into memory, but subsequent displays, until you resize the image region, are nearly instantaneous. An image region can have initial contents that are read in at compile time, in which case even the first display is nearly instantaneous. The disadvantage of a cache image is that it requires large amounts of memory and, due to internal memory allocation limitations, the user is actually restricted to images of less than 64K. Therefore, using cache image is not recommended if the image will be resized to be larger. This is the default cache specification.

Cache Viewport

A cache viewport contains just the part of the image that is visible on the screen. It usually comes up faster than a cache image initially, because less overhead is involved getting only the visible portion of an image into memory. Like a cache image, subsequent displays are nearly instantaneous. However, if the image is bigger than the viewport, scrolling is slowed because new portions must first be decoded, color mapped, and scaled. A cache viewport is useful for an image region that is made invisible and visible again, because that operation is nearly instantaneous.

Work Area Cache

it must be big enough to hold at least one scanline, that is, used as A work area cache is an arbitrarily sized area of memory, although a temporary location to build the image as it is being displayed. It is intended to be used when the user wants to control the exact amount of memory used because memory is scarce, or if the image will be resized to be larger. Usually this amount is much smaller than a typical viewport and thus the image appears a piece at a time.

The more pieces the image is broken down into, the more overhead is incurred and consequently the more time it takes to display the image. The larger the work area cache, the fewer pieces the image must be broken down into. Only occasionally does a work area cache retain usable data across display requests. It is useful if an

image region is partially obscured by another object that becomes visible and invisible repeatedly.

No Cache

No cache, unlike the other cache types, does not refer to the size of the memory area, but to the type of memory used. The first three cache specifications tell ESL to use program memory, a portion of the memory allocated to ESL itself with the -m switch. The no cache specification tells ESL to use system memory, the memory that is left over and is normally used for local applications and other programs the system may be running.

No cache is not part of the ESL program, is not saved in the binary file, and thus must be created and filled each time the program is run. Also the cache is not permanently allocated, so the system may discard the contents of the cache whenever system memory is needed. ESL determines the cache's size, based on how much memory is available when the image is displayed.