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
}
/**
+ * @brief Resizes the vector without initializing the data.
+ *
+ * Can be used as a data container for reading whole file content.
+ * @SINCE_1_9.27
+ * @param[in] count Count to resize to
+ */
+ void ResizeUninitialized( SizeType count )
+ {
+ Reserve( count );
+ VectorBase::SetCount( count );
+ }
+
+ /**
* @brief Resizes the vector. Does not change capacity.
*
* @SINCE_1_0.0