Skip to content

Conversation

@shahzadlone
Copy link

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.

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2019

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants