[PD-dev] macOS direct plist reading

Miller Puckette msp at ucsd.edu
Wed Nov 27 21:36:45 CET 2019


This sounds like a very good change.  It would be slicker to have updating
rewritten as well, but I don't think that's anywhere near as important.

I'm about ready to start going through PRs for inclusion in 0.51 - hoping to
get that out in December.

cheers
Miller

On Tue, Nov 26, 2019 at 09:27:24AM +0000, Jamie Bullock wrote:
> Nice work Dan!
> 
> > On 26 Nov 2019, at 00:20, Dan Wilcox <danomatika at gmail.com> wrote:
> > 
> > Howdy all,
> > 
> > Pd's start time on macOS has always felt a bit *slow*. Recently, someone on the pd-list noticed starting Pd with -noprefs helps a great deal.
> > 
> > I did some digging and the core basically performs a system call to the "defaults" command for *each* key/value in s_file.c, including a stat() check if the preferences file exists. That's a good amount of filesystem IO and probably explains why it takes *3-4 seconds* on my machine.
> > 
> > For a proposed update to fix this, I just got some code working which reads the plist into a dictionary object directly using the macOS CoreFoundation framework (all C). Reading keys and values is then much faster and Pd starts up almost instantaneously now. Next step would be to updating preference saving as well.
> > 
> > I hope to finalize this and put it up as a PR in a week or two for testing.
> > 
> > --------
> > Dan Wilcox
> > @danomatika <http://twitter.com/danomatika>
> > danomatika.com <http://danomatika.com/>
> > robotcowboy.com <http://robotcowboy.com/>
> > 
> > 
> > 
> > _______________________________________________
> > Pd-dev mailing list
> > Pd-dev at lists.iem.at
> > https://lists.puredata.info/listinfo/pd-dev
> 

> _______________________________________________
> Pd-dev mailing list
> Pd-dev at lists.iem.at
> https://lists.puredata.info/listinfo/pd-dev






More information about the Pd-dev mailing list