Skip to content

Cache the mate cigar the first time it is parsed on SamRecord #1115

@clintval

Description

@clintval

I'm starting to think we should cache the mate cigar like we do with the record's cigar. It would require similar trickery to detect when a new mate cigar is updated upon the record since we would have to intercept any call to setAttribute, check if the attribute is being set with the MC tag, and then reset the in-memory mate cigar to the new value. If I implement this suggestion, it will be in a separate PR.

This might be my next PR since we already have all Cigar stats cached after a single stat is accessed:

/** Statistics about this cigar which are computed once on first access and then cached. */
private lazy val stats: CigarStats = CigarStats(this)

From:

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions