------------------------------------------------------------
revno: 368
committer: Seif Lotfy <[email protected]>
branch nick: zeitgeist
timestamp: Mon 2012-01-16 13:25:29 +0100
message:
Seperate the allocation optimization into a new method
optimize_variant_allocation.
This optimization effects marshalling by slowint it down by around 0.06s for
10k
events yet saves us 10MB in memory consumption.
modified:
src/datamodel.vala
--
lp:zeitgeist
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.
To unsubscribe from this branch go to
https://code.launchpad.net/~zeitgeist/zeitgeist/bluebird/+edit-subscription
=== modified file 'src/datamodel.vala'
--- src/datamodel.vala 2012-01-15 14:43:43 +0000
+++ src/datamodel.vala 2012-01-16 12:25:29 +0000
@@ -412,6 +412,11 @@
}
Variant event_variant = vb.end ().get_normal_form ();
+ Variant ret = optimize_variant_allocation (event_variant);
+ return ret;
+ }
+
+ private Variant optimize_variant_allocation (Variant event_variant) {
// FIXME: this uses g_new0, we dont need the mem to be zero-filled
uchar[] data = new uchar[event_variant.get_size ()];
event_variant.store (data);
_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to : [email protected]
Unsubscribe : https://launchpad.net/~zeitgeist
More help : https://help.launchpad.net/ListHelp