Hi Kevin,
On Wednesday, August 1, 2001, at 10:30 AM, Allen Kevin E SSgt AFIWC/IOAS
wrote:
> Even on a local, very-fast system, the Shape layer included (the
> basic
> political map) takes several seconds to redraw each time the map is
> moved.
> I am guessing that it is reloading the data from the network as part of
> the
> redraw. Unfortunately, once deployed the network will be much slower,
> and a
> minute-long delay every time the user moves a map isn't acceptable.
The performance for the layer depends on how it's accessing the data.
In it's default mode, for every projection change, the ShapeLayer looks
at the projection, and then the ssx file to determine which graphics are
on the screen. Then, the Layer fetches those graphics.
There are a couple of things you can do. The first thing you might want
to try is to use the BufferedShapeLayer. It doesn't cache the
BinaryFile, but it does read in all the graphics from the file and
reuses them as they are needed on the screen. You do have to watch out
for memory usage for other, larger files.
You can also store the overview map in a jar file for the ShapeLayer (or
for that matter, any other layer that uses the BinaryFile) to use, and
keep that on the client locally.
> Based on the performance, I'm guessing that there is no data caching
> done
> at any level. The question I have is basically two-part, then - first,
> am I
> wrong, and is there any caching done?
Nope, there is no caching going on for the default ShapeLayer.
> Second, how hard would it be to
> implement a cached version of the BinaryFile?
The BinaryBufferedFile used by the ShapeLayer could be set up to do
caching. Right now, it's default buffer is 4096 bytes, but when it's
created you could set it to be the size of the file, and that would
basically be your cached file.
> I've looked at the shape
> package a bit, and honestly was a bit lost in there :) The BinaryFile
> seems
> like it would be an easier place to implement the caching, but I'm not
> sure
> what impact it might have in the consumers... Does the ShapeLayer
> open a
> new BinaryFile each time it tries to redraw? If it does, it would make
> any
> caching at that level useless...
It depends on the location of the file, because that depends on how the
BinaryFile reads it. If it's a local file, the file is accessed with a
reusable RandomAccessFile. If the file is remote, it's likely closed
and reopened to parse the file at a point earlier than when it was last
read.
> Alternately, any other suggestions for ways to get around this are
> welcome. We aren't locked into either Shape or VPF - all I basically
> need
> is a minimal political boundary layer, and I picked those two basically
> because those are the data sets we had easiest access too. If anyone
> has an
> alternate - and hopefully smaller :) - selection, I'm open to
> suggestions.
I'd go with the BufferedShapeLayer for smaller files, and keep them
local.
Hope this helps,
Don
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald F. Dietrick, dietrick@bbn.com
BBN Technologies, 10 Moulton Street, Cambridge, MA 02138
617.873.3031 FAX 2794
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Wed Aug 1 14:35:17 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT