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/
Awesome, thank you for this!
On Nov 25, 2019, at 7:20 PM, Dan Wilcox danomatika@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@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Nice work Dan!
On 26 Nov 2019, at 00:20, Dan Wilcox danomatika@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@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
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@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@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
Em qua., 27 de nov. de 2019 às 17:39, Miller Puckette msp@ucsd.edu escreveu:
I'm about ready to start going through PRs for inclusion in 0.51 - hoping to get that out in December
great news, remember that PR of mine we talked about at Pd Weekend where I gave a comestic update to all of Pd's documentation? You mentioned you should check that out before other changes, well, here it is: https://github.com/pure-data/pure-data/pull/608
cheers
Em qua., 27 de nov. de 2019 às 17:39, Miller Puckette msp@ucsd.edu escreveu:
I'm about ready to start going through PRs for inclusion in 0.51 - hoping to get that out in December
Howdy, we're getting to late february now and I wonder if there's a new estimate on the development and release of the next update. I ask it just cause I have plans on updating a lot of stuff with the new features that already made in, but maybe I should not jump to it right now if it's gonna take a little while.
thanks
Well, I didn't get through all the PRs in December (by a long shot) - and my next good block of time to work on this isn't til beginning of April. So hopefully msometime this spring.
cheers Miller
On Sun, Feb 23, 2020 at 07:19:44PM -0300, Alexandre Torres Porres wrote:
Em qua., 27 de nov. de 2019 ??s 17:39, Miller Puckette msp@ucsd.edu escreveu:
I'm about ready to start going through PRs for inclusion in 0.51 - hoping to get that out in December
Howdy, we're getting to late february now and I wonder if there's a new estimate on the development and release of the next update. I ask it just cause I have plans on updating a lot of stuff with the new features that already made in, but maybe I should not jump to it right now if it's gonna take a little while.
thanks
I think it is important as there is definite freeze when you save settings, ie. when saving from the audio dialog. I have working reading and writing code working in a test project, I just need to port the writing part now. :)
On Nov 27, 2019, at 9:36 PM, Miller Puckette msp@ucsd.edu wrote:
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.
-------- Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
sold :)
M
On Thu, Nov 28, 2019 at 03:12:54PM +0100, Dan Wilcox wrote:
I think it is important as there is definite freeze when you save settings, ie. when saving from the audio dialog. I have working reading and writing code working in a test project, I just need to port the writing part now. :)
On Nov 27, 2019, at 9:36 PM, Miller Puckette msp@ucsd.edu wrote:
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.
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
Ok, it's working and merged. Maybe shaving 3-4 seconds off of Pd's startup time will "save a dozen lives." :)
On Nov 28, 2019, at 3:12 PM, Dan Wilcox danomatika@gmail.com wrote:
I think it is important as there is definite freeze when you save settings, ie. when saving from the audio dialog. I have working reading and writing code working in a test project, I just need to port the writing part now. :)
On Nov 27, 2019, at 9:36 PM, Miller Puckette <msp@ucsd.edu mailto:msp@ucsd.edu> wrote:
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.
-------- Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/