Use usize index to identify observations, for further speed improvement and memory reduction

Description

Currently, to identify observations, we use ObservationHash which has 32 bytes. We can achieve some performance improvement and reduce the memory usage by replacing it with a simple integer index (wrapped in a ObservationIndex newtype, for type safety). This is the same class of optimization we already performed with replacing EventHash with EventIndex and PublicId with PeerIndex, which in both cases proved quite significant.

Environment

None

Status

Assignee

Adam Cigánek

Reporter

Adam Cigánek

Labels

External issue URL

None

External issue ID

None

Start date

2018/12/18

End date

2018/12/18

Task progress

None

Baseline start date

None

Baseline end date

None

Epic Link

Components

Priority

Major
Configure