The SparseList was created to provide the indexed accessible nodes as found in IndexedTree while reaping the performance and memory enhancements of CompressableList. These optimizations have been taken several steps further to gain significantly better performance over the current implementation of CompressableList.
In an effort to maximize performance, this ADT does NOT validate that arguments passed to methods are valid in any way. While this adds inherent risk to the use of this code, this is a volatile implementation class. As such, it should only be used for internal GlazedList development. It is up to the calling code to do any argument validation which may be necessary. If you are still concerned, consider the benefits. Being in a tree structure means the methods on this ADT are often recursive. Recursively validating arguments makes no sense, and has a real-world impact on performance, while not a Big-Oh impact.
Every effort has been made to squeeze the highest performance and smallest footprint out of this data structure. These benefits hopefully don't come at the cost of code clarity or maintainability. The memory usage of this ADT is bound to the number of non-null elements. Null elements have no additional memory impact on the data structure.
The intent of this high-performance, low-cost data structure is for improving the scalability of some of the GlazedLists. It is technically possible to scale this ADT above the Integer.MAX_SIZE barrier imposed by integer-based indexing. However, doing so requires particular care in the structuring of the list and should be avoided if possible. It is advised that users do their best to operate within the bounds of the Integer.MAX_SIZE size limit. @author Kevin Maltby
|
|