Re: [Core Data] Lightweight Objects
Re: [Core Data] Lightweight Objects
- Subject: Re: [Core Data] Lightweight Objects
- From: Andre <email@hidden>
- Date: Sun, 11 Nov 2007 08:37:12 +0900
On 平成 19/11/11, at 0:21, Paul Sargent wrote:
Hi Andre,
Thanks for your input.
On 10 Nov 2007, at 10:37, email@hidden wrote:
On 平成 19/11/10, at 19:02, Paul Sargent wrote:
So, I could have:
aLog ----to many---> aSample
Yes IMO thats good, factor out binary data. It actually ends up
being faster in the long run. Thats assuming that those 1byte
values are going to be longer than just.... one byte. Right?
Well... No, the one byte values are just one byte. That's all that's
logged, that's all I need to store. Hence the question.
To give a bit of context this is a 'viewer/library' type app, for
data that logged by an embedded device. So it's going to be drawing
graphs of this data typically. The reason the samples are just a
single byte each is because the memory on the device is limited
(16Kb).
Have you seen the benchmarks on CoreData on Leopard? They are
wicked fast.
I wouldn't be worried.
I haven't actually. It would be interesting to see numbers, but
can't find any myself.
Well, last I saw, they had some at WWDC last year, but not sure they
actually published... but they were impressive.
Lets say, for some analysis you want to do later, you want to grab
all samples, but you don't need the log information... well, how do
you do that efficiently if they are the same entity? (This is
assuming the aLog entity ends up having lots of fields populating it)
I'm not seeing myself doing that type of analysis, but I agree, it
makes sense if you are doing that kind of thing.
...and Yes, the log has a lot more information in it that more
suited to core data. A lot of who, what, where type stuff that
naturally fits into standard field types.
It's just this one property of the log. It just seems wrong to be
creating so many objects (up to 16 thousand per log), If I can
store the data in a single 16Kb BLOB, that's got to be more
efficient than 16K objects, each being 10+ times the size.
Well, then 16kb is nothing. I would just put it in the log...... but,
like has been said elsewhere.... Premature optimization... blalblabla
been said a million times I know....
Especially if you're talking about retrieving 16K objects to draw a
single graph.
Yea.
Any suggestions?
Your original idea, I think is better.
Thats just my opinion though!
Fair enough. I have a feeling this might be the sort of thing that I
have to try both ways and see how it does.
Yea, try it out, but I think storing 16kb would be trivial..... it
depends on I guess, how many samples your going to take verses how
many logs your going to make.
And it would be infinitely faster grabbing one log and iterating over
16k of data in memory... so.. I think I changed my mind! If you
sample is just going to be a single byte......
Andre
Paul
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden