iabtcf-java icon indicating copy to clipboard operation
iabtcf-java copied to clipboard

remainingVectors handling in v2

Open laktech opened this issue 5 years ago • 0 comments

This ticket is for us to re-think how remainingVectors are being handled. Currently, we create an array containaing segments following the core segment. This array is searched each time a request is made to fetch a field from a segment.

We should explore using the LazySegmentFactory and a mechanism to efficiently fetch vectors for a particular SegmentType. For example, using an EnumMap to store processed vectors.

The life-cycle of a segment would be as follows. All possible segments are added to a remainaingVectors like data-structure, most likely an ArrayList of size three. When a request is made to fetch a field from a segment, the remainingVectors are scanned to locate the segment. As segment types are identified, they should be moved to the EnumMap for efficient subsequent lookups.

laktech avatar Mar 08 '20 01:03 laktech