I use the Performance API to measure the speed of a complex frontend project where resources (available memory) are scare and UI runs like an embedded system for months without reloading.
Can I remove the older PerformanceEntries (marks and measures) and keep the latest ones?
Or can I limit the “kept” PerformanceMark/PerformanceMeasure object? (so chrome automatically discard old objects)
clearMarks and clearMeasures are not the best option for me.
setResourceTimingBufferSize sounds good but it is only affect “resource” performance entries per my understanding.
Bonus question: Is it good practice to measure the speed of the UI with Performance API
in production code that is going to be deployed to a costumer, and difficult to modify later on (if some issue were come up)?