vireo
vireo copied to clipboard
Optimized 5 different buffers.
Many vectors weren't being reserved where we already know the size.
This makes the vector re-allocate(expensive) more times than necessary.
I reserved the 5 vectors where we already knew how many elements will get pushed in.
I also reduced the scope of audio_samples
,video_samples
,edit_boxes
because they were declared way earlier than they are actually used. (prefer to delay declaration, as much as possible.)
Also made edit_box
a constant and a reference to save a copy cost and const
because it isn't changed.