Skip to content

Comments

(PUP-5505) Improve performance of reading service plists#4447

Merged
kylog merged 1 commit intopuppetlabs:3.xfrom
MikaelSmith:retryplutil
Dec 3, 2015
Merged

(PUP-5505) Improve performance of reading service plists#4447
kylog merged 1 commit intopuppetlabs:3.xfrom
MikaelSmith:retryplutil

Conversation

@MikaelSmith
Copy link
Contributor

Reading text-based plist files with plutil appears to incur a lot of
overhead. Attempt to read all plists as text first, falling back to
plutil if that fails. Failing to read a binary plist appears to incur
very little overhead.

This appears to compare favorably to other approaches using
CFPropertyList, and is a much smaller change. Average times for puppet resource service improved from 30 seconds to 5 seconds on a variety of
tested systems (OS X 10.9 with Ruby 1.9.3, OS X 10.10 with Ruby 2.0.0,
OS X 10.11 with Ruby 2.1.7).

Reading text-based plist files with plutil appears to incur a lot of
overhead. Attempt to read all plists as text first, falling back to
plutil if that fails. Failing to read a binary plist appears to incur
very little overhead.

This appears to compare favorably to other approaches using
CFPropertyList, and is a much smaller change. Average times for `puppet
resource service` improved from 30 seconds to 5 seconds on a variety of
tested systems (OS X 10.9 with Ruby 1.9.3, OS X 10.10 with Ruby 2.0.0,
OS X 10.11 with Ruby 2.1.7).
@MikaelSmith
Copy link
Contributor Author

I've tested this merged into a Puppet 4.2.3 install and running https://github.com/puppetlabs/puppet/blob/stable/acceptance/tests/resource/service/launchd_provider.rb. The test passes (and runs in 45 seconds instead of 170 seconds).

@kylog
Copy link

kylog commented Dec 2, 2015

👍

Will merge after puppet-agent 1.3.2 ships. (I know this is targeted at 3.x so the merge itself wouldn't be a concern, but I have a mild preference to do the merge-ups at the same time.)

@MikaelSmith
Copy link
Contributor Author

Should be clear to do so now.

kylog pushed a commit that referenced this pull request Dec 3, 2015
(PUP-5505) Improve performance of reading service plists
@kylog kylog merged commit 221bdc2 into puppetlabs:3.x Dec 3, 2015
@kylog
Copy link

kylog commented Dec 3, 2015

Merged up to stable and master too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants