[Tizen.Log] Optimize garbage collection (#5156)
* [Tizen.Log] Optimize garbage collection
The CLR automatically converts string into byte array when it invokes
native function. In this process, the CLR allocates byte array on heap,
which will be a garbage, for every single string. If applications are
printing dlog too bursty, those garbage would pile up, consuming too much
memory. To reduce those garbage, manually allocates byte array on stack
and convert string into that byte array.
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
* [Tizen.Log] Remove Substring function (#2)
To cut filename from whole filepath, Print function uses Substring function.
Also, filename string is newly created.
To avoid newly create memory which can be garbage collecting target,
Substring function is removed.
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Co-authored-by: Yunhee <yuni.seo@samsung.com>
---------
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Co-authored-by: yuni.seo <129935814+yuni-seo@users.noreply.github.com>
Co-authored-by: Yunhee <yuni.seo@samsung.com>