I've been doing some more work on my FeatureCache implementation. I am
currently designing a "buffer" that will hold a set number of features from
the feature cache in memory. This will increase performance when a user is
working with the same small group of features. The maximum number of
features in the buffer will be set by the user and can be based on RAM of
the computer running OpenJUMP and the user's need for speed. (A default
maximum feature count will be provided.)
I need some help from our more experienced Java developers. Larry seems to
have a nack for performance issues, so perhaps he will have some advice. Any
suggestion are welocome. :]
I'm trying to figure what type of collection/container to use for the
buffer. I took a look at the existing Java Collection implementations, and I
don't see one that will work out of the box. I need a First-In-First-Out
collection whose growth I can limit. I think I have three choices for the
buffer's container:
[1] Extend and modify an existing Collection implementation.
[2] Write my own implementation of the Collection interface that behaves the
way I need it to.
[3] Write an implemenation that uses an array internally, works directly
with objects that implement the Feature interface, but that does not
implement Collection.
Option 1 is probably the easiest, but I don't think it will be the most
efficient or fast. Option #2 is great from a reusability standpoint, but it
is a lot more work. I think Option 3 will be the fastest and most efficient,
becuase I won't have to make object casts, but it will be more work than
Option 1.
How much speed will I gain if I avoid the Collection interface and the
resulting casts from Object to Feature? Do you think Option 2 will be
significantly faster?
I think speed will be critical for this part of the FeatureCache
implementation. The only part more critical from a speed point of view will
be the binary format reader/writer.
Thanks,
The Sunburned Surveyor
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jump-pilot-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel