Page MenuHomePhabricator

evas_textblock: enhance escape character handling
Needs ReviewPublic

Authored by ali.alzyod on Jul 22 2019, 3:21 AM.



-Lazy initialization for html escapes lists
-Lower memory consumtion for escapes lists
-Simplify code maintenance by sorting lists on runtime, new items donot need to respect sort order(run time will handle it)

Diff Detail

rEFL core/efl
No Linters Available
No Unit Test Coverage
Build Status
Buildable 15906
Build 10771: arc lint + arc unit
ali.alzyod created this revision.Jul 22 2019, 3:21 AM

It seems that this patch has no reviewers specified. If you are unsure who can review your patch, please check this wiki page and see if anyone can be added:

ali.alzyod requested review of this revision.Jul 22 2019, 3:21 AM
cedric requested changes to this revision.Jul 29 2019, 11:35 AM
cedric added inline comments.

I am not a big fan of this function. I would prefer to have one level more of indirection that does all the logic of the len, source and compare function then call the function that just does the allocation and sort. All the caller will use the specific function without having to specify an enum.


Why not memcpy?


Same as above. I think split function would be nicer here too. So same coment as for the previous function.


Weird space character.

This revision now requires changes to proceed.Jul 29 2019, 11:35 AM
ali.alzyod added inline comments.Jul 29 2019, 12:51 PM

I think I made mistake by not adding comment to this function


because I am not copying buffer to buffer but instead addresses of struct of one buffer to other buffer.

I use this technique to save memory.

The idea that i have struct contain (escape_string, escape_value,escape_string_len,escape_value_len).
And I need two copy of array of these struct.
So first I create array with all struct element, then create two arrays that have addresses for each element of first array, the sort addrress in both arrays, by doing this I am saving alot of memory


I should add comment to this function, sorry

ali.alzyod updated this revision to Diff 24473.Aug 25 2019, 9:31 AM

remove space

ali.alzyod marked an inline comment as done.

remove enum, and flat function call

ali.alzyod marked 2 inline comments as done.Aug 25 2019, 10:12 AM
ali.alzyod updated this revision to Diff 24703.Sep 3 2019, 4:27 AM

code convention