Re: Improve performance of data structure saved to disk

2015-08-06 Thread Sixten Otto
On Thu, Aug 6, 2015 at 9:31 AM, Jens Alfke j...@mooseyard.com wrote: As far as I know, there’s no good Cocoa solution for super-simple persistence — something like a persistent NSDictionary that can efficiently store any number of keys. This would be pretty easy to implement using a

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Uli Kusterer
On 06 Aug 2015, at 05:17, Juanjo Conti jjco...@carouselapps.com wrote: At the moment I'm using Keyed-Archiving, but after detecting performance issues and read I'm changing to Core-Data. How did you detect these performance issues, and where exactly did it show you that keyed archiving is at

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Juanjo Conti
I was calling archive a lot of times! Changing that really improve performance. Thanks! On Thu, Aug 6, 2015 at 9:09 PM, Graham Cox graham@bigpond.com wrote: With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve used that approach for several thousand objects

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Graham Cox
With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve used that approach for several thousand objects that were more complex than cookies; this was on a Mac, but it was back in 2004 so it was probably slower than today’s iPhones ;-) I detect the performance

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Uli Kusterer
On 06 Aug 2015, at 02:19, Rick Mann rm...@latencyzero.com wrote: On Aug 5, 2015, at 17:14 , Jens Alfke j...@mooseyard.com wrote: It’s part of the language design that only classes support inheritance, not structs or enums. Basically, subclassing pass-by-value types is problematic. For

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Jens Alfke
On Aug 5, 2015, at 8:42 PM, Quincey Morris quinceymor...@rivergatesoftware.com wrote: IMO, Core Data is a terribly painful technology that will make you very, very miserable, not to mention adding many months to your project. I’m not _quite_ as down on it, but my attempts to use it circa

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Marco S Hyman
On Aug 6, 2015, at 10:38 AM, Rick Mann rm...@latencyzero.com wrote: I guess. But we need some kind of extensible way of defining a set of valid selectors, ideally with optional string conformance and raw values (but not required to be strings). Maybe. Sounds like you want to use all of

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Jens Alfke
On Aug 6, 2015, at 6:36 AM, Juanjo Conti jjco...@carouselapps.com wrote: I've checked the number of entries and is only 350. They are regular cookies for well known sites like google, new relic, twitter... With only 350 objects you should be fine using a ‘dumb’ archived dictionary. I’ve

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Rick Mann
Sorry, I didn't mean selectors in the sense of methods, but as a generic mechanism for indicating one of any number. My original need was around NSNotificationCenter, which uses strings to indicate the notification being sent. In an ideal world, these wouldn't be strings under the hood, but

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Rick Mann
I guess. But we need some kind of extensible way of defining a set of valid selectors, ideally with optional string conformance and raw values (but not required to be strings). Sent from my iPhone On Aug 6, 2015, at 09:20, Jens Alfke j...@mooseyard.com wrote: On 06 Aug 2015, at 02:19,

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Quincey Morris
On Aug 6, 2015, at 09:20 , Jens Alfke j...@mooseyard.com wrote: You can't do that, because instances of the subclassed enum won’t be valid instances of the super-enum. I’m not sure that subclassing is what’s being asked for here. It seems like it would be useful to be able to define a new

Re: Swift enums and NSNotificationCenter

2015-08-06 Thread Jens Alfke
On 06 Aug 2015, at 02:19, Rick Mann rm...@latencyzero.com wrote: On Aug 5, 2015, at 17:14 , Jens Alfke j...@mooseyard.com wrote: It’s part of the language design that only classes support inheritance, not structs or enums. Basically, subclassing pass-by-value types is problematic. For

Re: Improve performance of data structure saved to disk

2015-08-06 Thread Juanjo Conti
I've checked the number of entries and is only 350. They are regular cookies for well known sites like google, new relic, twitter... I detect the performance issue using Instruments to mesure CPU time. The heaviest call from my call resulted to [CookieKey encodeWithCoder:] which current

UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

2015-08-06 Thread Ted Bradley
The effect I'm trying to achieve is a kind of sticky header cell. It's important to me that the sticky cell floats over the top of the others. Something a bit like this: ┌──┐ │ │ │ Cell 0 │ │ ├┐ └┬─┘│ │ Cell 4 │ │ │

Re: User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
I just realized I asked this question a year ago in September. At the time I didn't really get a good answer, which is why we're back at it today. One thing I don't remember was if the addSuiteNamed and removeSuiteNamed option worked… On Thu, Aug 6, 2015 at 9:19 AM, Alex Kac a...@webis.net wrote:

Re: User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
Also, we're now using Swift…which won't let you reassign self. On Thu, Aug 6, 2015 at 9:23 AM, Alex Kac a...@webis.net wrote: I just realized I asked this question a year ago in September. At the time I didn't really get a good answer, which is why we're back at it today. One thing I don't

User Default Controller in NIB - subclass to use the suite instead

2015-08-06 Thread Alex Kac
We use NSUserDefaults(initWithSuite:) in our app so that our helper apps, plugins all can share the same preferences. We also use the User Default controller in our NIBs to bind settings to it. I'd like to use a subclass of this which would use the suite instead of standardUserDefaults. At least

Re: UICollectionView not obeying zIndex of UICollectionViewLayoutAttributes

2015-08-06 Thread Luke Hiesterman
Can you post your implementations -layoutAttributesForElementsInRect: as well as -layoutAttributesForItemAtIndexPath:? Luke On Aug 6, 2015, at 8:09 AM, Ted Bradley earlte...@googlemail.com wrote: The effect I'm trying to achieve is a kind of sticky header cell. It's important to me that