Avoid execessive Pushback when Dali::Vector<char> used as file buffer container 94/238294/3
authorCheng-Shiun Tsai <cheng.tsai@samsung.com>
Fri, 10 Jul 2020 08:49:19 +0000 (09:49 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Wed, 23 Sep 2020 08:30:12 +0000 (08:30 +0000)
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

Depends on https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-core/+/238235/

Change-Id: I560ec768a61e3b41c88775397a87f692f3342d54


No differences found