[Zeitgeist] [Merge] lp:~mhr3/zeitgeist/string-chunks into lp:zeitgeist
Michal Hruby has proposed merging lp:~mhr3/zeitgeist/string-chunks into lp:zeitgeist. Requested reviews: Siegfried Gevatter (rainct) For more details, see: https://code.launchpad.net/~mhr3/zeitgeist/string-chunks/+merge/85259 As discussed on IRC... -- https://code.launchpad.net/~mhr3/zeitgeist/string-chunks/+merge/85259 Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist. === modified file 'src/datamodel.vala' --- src/datamodel.vala 2011-10-17 07:46:27 + +++ src/datamodel.vala 2011-12-11 19:47:28 + @@ -285,16 +285,40 @@ public class Event : Object { +private static StringChunk url_store; + public uint32id { get; set; } public int64 timestamp { get; set; } -public stringinterpretation { get; set; } -public stringmanifestation { get; set; } -public stringactor { get; set; } public stringorigin { get; set; } +public string actor +{ +get { return _actor; } +set { _actor = url_store.insert_const (value); } +} +public string interpretation +{ +get { return _interpretation; } +set { _interpretation = url_store.insert_const (value); } +} +public string manifestation +{ +get { return _manifestation; } +set { _manifestation = url_store.insert_const (value); } +} + +private unowned string _actor; +private unowned string _interpretation; +private unowned string _manifestation; + public GenericArraySubject subjects { get; set; } public ByteArray? payload { get; set; } +static construct +{ +url_store = new StringChunk (4096); +} + construct { subjects = new GenericArraySubject (); @@ -514,16 +538,41 @@ public class Subject : Object { +private static StringChunk url_store; public string uri { get; set; } -public string interpretation { get; set; } -public string manifestation { get; set; } -public string mimetype { get; set; } public string origin { get; set; } public string text { get; set; } public string storage { get; set; } +// FIXME: current_uri is often the same as uri, we don't need to waste +// memory for it public string current_uri { get; set; } +public string mimetype +{ +get { return _mimetype; } +set { _mimetype = url_store.insert_const (value); } +} +public string interpretation +{ +get { return _interpretation; } +set { _interpretation = url_store.insert_const (value); } +} +public string manifestation +{ +get { return _manifestation; } +set { _manifestation = url_store.insert_const (value); } +} + +private unowned string _mimetype; +private unowned string _interpretation; +private unowned string _manifestation; + +static construct +{ +url_store = new StringChunk (4096); +} + public Subject.from_variant (Variant subject_variant) { VariantIter iter = subject_variant.iterator(); ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
Re: [Zeitgeist] [Merge] lp:~mhr3/zeitgeist/string-chunks into lp:zeitgeist
Review: Approve -- https://code.launchpad.net/~mhr3/zeitgeist/string-chunks/+merge/85259 Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
[Zeitgeist] [Branch ~zeitgeist/zeitgeist/bluebird] Rev 345: Use statically allocated StringChunk to store the manifestations/interpretations/mimetypes/actors
revno: 345 committer: Michal Hruby michal@gmail.com branch nick: bluebird timestamp: Sun 2011-12-11 20:44:41 +0100 message: Use statically allocated StringChunk to store the manifestations/interpretations/mimetypes/actors 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 2011-10-17 07:46:27 + +++ src/datamodel.vala 2011-12-11 19:44:41 + @@ -285,16 +285,40 @@ public class Event : Object { +private static StringChunk url_store; + public uint32id { get; set; } public int64 timestamp { get; set; } -public stringinterpretation { get; set; } -public stringmanifestation { get; set; } -public stringactor { get; set; } public stringorigin { get; set; } +public string actor +{ +get { return _actor; } +set { _actor = url_store.insert_const (value); } +} +public string interpretation +{ +get { return _interpretation; } +set { _interpretation = url_store.insert_const (value); } +} +public string manifestation +{ +get { return _manifestation; } +set { _manifestation = url_store.insert_const (value); } +} + +private unowned string _actor; +private unowned string _interpretation; +private unowned string _manifestation; + public GenericArraySubject subjects { get; set; } public ByteArray? payload { get; set; } +static construct +{ +url_store = new StringChunk (4096); +} + construct { subjects = new GenericArraySubject (); @@ -514,16 +538,41 @@ public class Subject : Object { +private static StringChunk url_store; public string uri { get; set; } -public string interpretation { get; set; } -public string manifestation { get; set; } -public string mimetype { get; set; } public string origin { get; set; } public string text { get; set; } public string storage { get; set; } +// FIXME: current_uri is often the same as uri, we don't need to waste +// memory for it public string current_uri { get; set; } +public string mimetype +{ +get { return _mimetype; } +set { _mimetype = url_store.insert_const (value); } +} +public string interpretation +{ +get { return _interpretation; } +set { _interpretation = url_store.insert_const (value); } +} +public string manifestation +{ +get { return _manifestation; } +set { _manifestation = url_store.insert_const (value); } +} + +private unowned string _mimetype; +private unowned string _interpretation; +private unowned string _manifestation; + +static construct +{ +url_store = new StringChunk (4096); +} + public Subject.from_variant (Variant subject_variant) { VariantIter iter = subject_variant.iterator(); ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp
[Zeitgeist] [Merge] lp:~mhr3/zeitgeist/string-chunks into lp:zeitgeist
The proposal to merge lp:~mhr3/zeitgeist/string-chunks into lp:zeitgeist has been updated. Status: Needs review = Merged For more details, see: https://code.launchpad.net/~mhr3/zeitgeist/string-chunks/+merge/85259 -- https://code.launchpad.net/~mhr3/zeitgeist/string-chunks/+merge/85259 Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist. ___ Mailing list: https://launchpad.net/~zeitgeist Post to : zeitgeist@lists.launchpad.net Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp