summaryrefslogtreecommitdiff
path: root/src/tests/eolian/data/class_simple_ref.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-09-28 17:18:43 +0100
committerTom Hacohen <tom@stosb.com>2015-09-28 18:39:15 +0100
commite2344b9b9ef664c8a251ef21d1afabee0b8326fd (patch)
tree00f7d07aa5355ba694549c9e015fded30313e727 /src/tests/eolian/data/class_simple_ref.c
parent17f4c45fc929d26bcbf4e3e8b10d2066d9a1341f (diff)
Eo: reduce memory usage across applications.
As described by Carsten in his email to edev ML titled: "[E-devel] eo stability - i think we need to postpone that" with the switch to Eo2 we significantly increased our usage of RW memory pages, and thus significantly increased our memory usage when running multiple applications. The problem was that during the migration to Eo2 the op id cache and the op description arrays were merged, causing the op description arrays to no longer be RO. This patch enables users of Eo (mainly Eolian) to declare those arrays as const (RO) again, saving that memory. There might be performance implications with this patch. I had to remove the op desc array sorting, and I used a hash table for the lookup. I think the op desc sorting doesn't really affect performance because that array is seldom accessed and is usually pretty short. The hash table is not a problem either, because it's behind the scenes, so it can be changed to a more efficient data structure if the hash table is not good enough. The hash table itself is also rarely accessed, so it's mostly about memory. Please keep an eye for any bugs, performance or excessive memory usage. I believe this should be better on all fronts. This commit *BREAKS ABI*. @fix
Diffstat (limited to 'src/tests/eolian/data/class_simple_ref.c')
-rw-r--r--src/tests/eolian/data/class_simple_ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/eolian/data/class_simple_ref.c b/src/tests/eolian/data/class_simple_ref.c
index cd1b28ac60..0c6a86fec2 100644
--- a/src/tests/eolian/data/class_simple_ref.c
+++ b/src/tests/eolian/data/class_simple_ref.c
@@ -25,7 +25,7 @@ int _class_simple_bar(Eo *obj, Evas_Simple_Data *pd, int x);
25 25
26EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, int, 0, EO_FUNC_CALL(x), int x); 26EOAPI EO_FUNC_BODYV(evas_obj_simple_bar, int, 0, EO_FUNC_CALL(x), int x);
27 27
28static Eo_Op_Description _class_simple_op_desc[] = { 28static const Eo_Op_Description _class_simple_op_desc[] = {
29 EO_OP_FUNC(evas_obj_simple_a_set, _class_simple_a_set), 29 EO_OP_FUNC(evas_obj_simple_a_set, _class_simple_a_set),
30 EO_OP_FUNC(evas_obj_simple_a_get, _class_simple_a_get), 30 EO_OP_FUNC(evas_obj_simple_a_get, _class_simple_a_get),
31 EO_OP_FUNC(evas_obj_simple_foo, __eolian_class_simple_foo), 31 EO_OP_FUNC(evas_obj_simple_foo, __eolian_class_simple_foo),
@@ -42,4 +42,4 @@ static const Eo_Class_Description _class_simple_class_desc = {
42 NULL 42 NULL
43}; 43};
44 44
45EO_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL); \ No newline at end of file 45EO_DEFINE_CLASS(class_simple_class_get, &_class_simple_class_desc, NULL, NULL);