summaryrefslogtreecommitdiff
path: root/src/bin/eolian/eo_generator.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/bin/eolian/eo_generator.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 '')
-rw-r--r--src/bin/eolian/eo_generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/eolian/eo_generator.c b/src/bin/eolian/eo_generator.c
index 85d3cb7ec0..2e4f545391 100644
--- a/src/bin/eolian/eo_generator.c
+++ b/src/bin/eolian/eo_generator.c
@@ -19,7 +19,7 @@ static Eina_Hash *_funcs_params_init = NULL;
19 19
20static const char 20static const char
21tmpl_eo_ops_desc[] = "\ 21tmpl_eo_ops_desc[] = "\
22static Eo_Op_Description _@#class_op_desc[] = {@#list_op\n};\n\n"; 22static const Eo_Op_Description _@#class_op_desc[] = {@#list_op\n};\n\n";
23 23
24static const char 24static const char
25tmpl_events_desc[] = "\ 25tmpl_events_desc[] = "\