Dali::Vector<char> used as file buffer container 35/238235/6
authorCheng-Shiun Tsai <cheng.tsai@samsung.com>
Thu, 9 Jul 2020 15:58:07 +0000 (16:58 +0100)
committerTsai <cheng.tsai@samsung.com>
Wed, 26 Aug 2020 15:34:59 +0000 (15:34 +0000)
commit46b920b55217b4a048b01de899f6ef55a5dd7168
tree17d3954c21e9fb14c7ab14348212fddd5ac52f2d
parente5f24bbdefd82ab32d7530dc44ffc321e5b42d17
Dali::Vector<char> used as file buffer container

dali-adator file reader uses Dali::Vector<char,true> as the container for data buffer.
However, Dali::Vector::Resize always initialize the element by doing PushBack().
Considering now you need to read a file of 1MB,
Resize() would lead to PushBack() of one byte X one million times,
so that it becomes a vector of 1MB, this is unnecessary waste of CPU time.
We need another method which simply allocates the buffer without initialize the value.
It will help use cases such as MCD Avatar3D / AREmoji where there are a lot of resource files

Change-Id: I03eb723142799cc9ae0f71bc1b35036e1b21cc81
dali/public-api/common/dali-vector.h