This single test accounted for 1% of my terminology benchmark.
I am considering moving evas_string_char_next_get and
eina_unicode_utf8_get_next to become inline as their function
entry/exit point account for 3% of the same benchmark.
The biggest win would be to get rid of the memcpy _termpty_text_copy
that account for 16%.
In the micro optimization part, we also still do to much malloc
in font_draw_prepare as we don't recycle the array there and account
for 3% of the benchmark in malloc/free there. In the same ballpark
_text_save_top account for 2% of the time in malloc/free.
In that same benchmark, evas_object_textgrid_render account for 5%
where 4% of its time is spend in evas_common_font_draw_prepare. At this
point I am not sure that rewriting textgrid is gona help us at all. We
will win almost as much by just inlining the get_next things in evas
and eina for a minute of development time.
SVN revision: 82927
{
int p, d;
- if (decoded) *decoded = 0;
- if ((!str) || (pos < 0)) return 0;
+ if ((!str) || (pos < 0))
+ {
+ if (decoded) *decoded = 0;
+ return 0;
+ }
p = pos;
d = eina_unicode_utf8_get_next(str, &p);
if (decoded) *decoded = d;