photonvision icon indicating copy to clipboard operation
photonvision copied to clipboard

Use ReadQueue for PhotonCamera timestamps

Open mcm001 opened this issue 9 months ago • 2 comments

This removes the extra GetLastChange call to keep everything properly atomic.

Closes #1303

mcm001 avatar May 05 '24 00:05 mcm001

What's the overhead of enabling poll storage? If it's somewhat decent we should make this a configurable option when actually creating the camera.

srimanachanta avatar May 12 '24 08:05 srimanachanta

It just makes the circular buffer of std vectors of bytes larger. Since the contents of the vector are dynamically allocated, the cost is zero, and then as you push more new packets in, you allocate new memory. So probably on the order of 20kb, at worst, of dynamically allocated memory, and 20*sizeof(vector) statically?

mcm001 avatar May 13 '24 02:05 mcm001