(PUP-5505) Improve performance of reading service plists#4447
Merged
kylog merged 1 commit intopuppetlabs:3.xfrom Dec 3, 2015
Merged
(PUP-5505) Improve performance of reading service plists#4447kylog merged 1 commit intopuppetlabs:3.xfrom
kylog merged 1 commit intopuppetlabs:3.xfrom
Conversation
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).
19a899d to
2583586
Compare
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). |
|
👍 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.) |
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
|
Merged up to stable and master too. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 serviceimproved from 30 seconds to 5 seconds on a variety oftested 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).