This provides a huge performance boost over ArrayList on partially empty lists. However, the CompressableList is one of the volatile implementation classes for internal development and isn't the best structure for the current usage. The GlazedLists use CompressableList to store only three values: Boolean.TRUE, Boolean.FALSE, and null. As such, it was slower and more memory intensive than it could be due to its general purpose design.
The Barcode is designed such that a list of n elements of the same colour will contain at most one node for BLACK and no nodes for WHITE. This will improve the performance and scalability of the GlazedLists which currently make use of CompressableList.
Barcode does not support more than two values stored in the list. Three different values are used by one of the GlazedLists at this time. Until UniqueList is refactored to make use of only two values, Barcode cannot completely replace CompressableList and they will exist in parallel.
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.
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 sequences of BLACK elements. WHITE elements have no memory impact on the data structure. @author Kevin Maltby
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|