The best advice I can give on optimization is never do it until you have
working code. I have been working on JUMP for three years and have only
started looking at optimization the last month or so.

See http://www.extremeprogramming.org/rules/optimize.html

When I said I didn't understand what problem you are trying to solve, I
wasn't talking about queues and such.  I was asking (big picture) what
OpenJump deficiency are you trying to remedy?

Larry

On 4/13/07, Sunburned Surveyor <[EMAIL PROTECTED]> wrote:

Michael and Larry,

Thank you for the responses. Please see my comments below.

Michael wrote: "Did you have a look to java 5 documentation ? : you'll
find interesting
information in Queue interface and LinkedList implementation."

Yes, I took a look at the Queue interface. It had the First-In-First-Out
behavior, but I didn't see a way to limit the growth of the content, which I
would need to do for my purposes. If we decide to make the JUMP to a newer
JDK version that supports generics I might take a look at this.

Michael wrote: "I think there are also many open-source projects related
to Cache
management."

Could you toss me a name or two? :] Remember that this question was really
about just the buffer, which is one part of the whole FeatureCache.

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

I'm trying to find the most efficient and fast First-In-First-Out
collection  for in-memory representation of features. I was concerned the
cost of object casting, since Java 1.4.2 doesn't support generics. Java
1.4.2 also does not contain a collection that implements the
"growth-to-a-limit" behavior that I need.

I will visit the JDK Version topic in a new thread, because I feel it is
an important one.

The Sunburned Surveyor


On 4/13/07, Larry Becker <[EMAIL PROTECTED]> wrote:

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

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