vireo icon indicating copy to clipboard operation
vireo copied to clipboard

Optimized 5 different buffers.

Open shahzadlone opened this issue 6 years ago • 1 comments

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.

shahzadlone avatar Jan 29 '19 23:01 shahzadlone

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 17 '19 00:11 CLAassistant