Hi Sunburned,

 Michaël is correct.  It is time to embrace the Java 5 enhancements.  It
may even be time to start considering Java 6.  My testing shows no problems
with compatibility.

 Regarding specific suggestions, I'm afraid I haven't yet understood
exactly what problem you are trying to solve.

regards,
Larry

On 4/13/07, Michaël Michaud <[EMAIL PROTECTED]> wrote:

Hi,

Did you have a look to java 5 documentation ? : you'll find interesting
information in Queue interface and LinkedList implementation.
I think there are also many open-source projects related to Cache
management.
With java 5 generics cast is no more necessary.
My advices :
- read the javadoc first
- use java 5 (this subject has not been discussed for a long time, but
my personnal feeling is that it is now time to use java 5, specially for
a new important project / feature)
- do-it yourself is good to learn, but for general problems and
performance issues, existing libs is often a better choice :-)

My two cents

Michaël


Sunburned Surveyor a écrit :

> 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
>
>


-------------------------------------------------------------------------
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




--
http://amusingprogrammer.blogspot.com/
-------------------------------------------------------------------------
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

Reply via email to