Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(23)

Issue 6493100: ensure use of py yaml c extension for speed.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by hazmat
Modified:
11 years, 7 months ago
Reviewers:
gz, mp+123470, jimbaker
Visibility:
Public.

Description

ensure use of py yaml c extension for speed. Backwards compatible. Drops test time in half. Should improve speed across the board, things like status will see marked improvements. https://code.launchpad.net/~hazmat/juju/fast-yaml/+merge/123470 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 5

Patch Set 2 : ensure use of py yaml c extension for speed. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -411 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M juju/agents/tests/test_unit.py View 3 chunks +2 lines, -2 lines 0 comments Download
M juju/charm/config.py View 1 2 chunks +4 lines, -3 lines 0 comments Download
M juju/charm/metadata.py View 1 2 chunks +5 lines, -2 lines 0 comments Download
M juju/charm/tests/test_base.py View 1 2 chunks +6 lines, -4 lines 0 comments Download
M juju/charm/tests/test_bundle.py View 1 3 chunks +5 lines, -5 lines 0 comments Download
M juju/charm/tests/test_config.py View 1 7 chunks +10 lines, -8 lines 0 comments Download
M juju/charm/tests/test_directory.py View 1 3 chunks +3 lines, -3 lines 0 comments Download
M juju/charm/tests/test_metadata.py View 1 3 chunks +4 lines, -3 lines 0 comments Download
M juju/charm/tests/test_publisher.py View 1 3 chunks +3 lines, -3 lines 0 comments Download
M juju/control/config_set.py View 1 2 chunks +2 lines, -2 lines 0 comments Download
M juju/control/constraints_get.py View 1 2 chunks +3 lines, -2 lines 0 comments Download
M juju/control/deploy.py View 1 3 chunks +2 lines, -3 lines 0 comments Download
M juju/control/initialize.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/control/status.py View 2 chunks +4 lines, -2 lines 0 comments Download
M juju/control/tests/test_add_unit.py View 1 2 chunks +2 lines, -3 lines 0 comments Download
M juju/control/tests/test_bootstrap.py View 1 1 chunk +2 lines, -2 lines 0 comments Download
M juju/control/tests/test_config_get.py View 1 3 chunks +3 lines, -5 lines 0 comments Download
M juju/control/tests/test_config_set.py View 1 4 chunks +9 lines, -10 lines 0 comments Download
M juju/control/tests/test_constraints_get.py View 7 chunks +7 lines, -8 lines 0 comments Download
M juju/control/tests/test_deploy.py View 10 chunks +10 lines, -11 lines 0 comments Download
M juju/control/tests/test_destroy_environment.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/control/tests/test_expose.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/control/tests/test_initialize.py View 2 chunks +3 lines, -3 lines 0 comments Download
M juju/control/tests/test_open_tunnel.py View 1 chunk +3 lines, -2 lines 0 comments Download
M juju/control/tests/test_remove_relation.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/control/tests/test_scp.py View 1 chunk +0 lines, -1 line 0 comments Download
M juju/control/tests/test_status.py View 1 6 chunks +6 lines, -6 lines 0 comments Download
M juju/control/tests/test_unexpose.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/control/tests/test_upgrade_charm.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/control/tests/test_utils.py View 1 2 chunks +1 line, -1 line 0 comments Download
M juju/environment/config.py View 2 chunks +2 lines, -2 lines 2 comments Download
M juju/environment/tests/test_config.py View 26 chunks +55 lines, -54 lines 0 comments Download
M juju/hooks/protocol.py View 3 chunks +4 lines, -3 lines 0 comments Download
M juju/hooks/scheduler.py View 3 chunks +4 lines, -3 lines 0 comments Download
M juju/hooks/tests/test_cli.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/hooks/tests/test_invoker.py View 7 chunks +6 lines, -6 lines 0 comments Download
M juju/hooks/tests/test_scheduler.py View 18 chunks +19 lines, -20 lines 0 comments Download
M juju/lib/format.py View 2 chunks +3 lines, -3 lines 0 comments Download
A juju/lib/serializer.py View 1 1 chunk +21 lines, -0 lines 0 comments Download
M juju/providers/common/cloudinit.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/providers/common/state.py View 3 chunks +4 lines, -3 lines 0 comments Download
M juju/providers/common/tests/test_cloudinit.py View 2 chunks +3 lines, -3 lines 0 comments Download
M juju/providers/common/tests/test_findzookeepers.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/providers/common/tests/test_state.py View 3 chunks +4 lines, -3 lines 0 comments Download
M juju/providers/common/tests/test_utils.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/providers/common/utils.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/providers/ec2/tests/common.py View 3 chunks +2 lines, -2 lines 0 comments Download
M juju/providers/ec2/tests/test_bootstrap.py View 3 chunks +4 lines, -5 lines 0 comments Download
M juju/providers/ec2/tests/test_findzookeeper.py View 1 chunk +1 line, -2 lines 0 comments Download
M juju/providers/ec2/tests/test_launch.py View 3 chunks +3 lines, -4 lines 0 comments Download
M juju/providers/ec2/tests/test_provider.py View 1 chunk +1 line, -0 lines 0 comments Download
M juju/providers/ec2/tests/test_state.py View 5 chunks +6 lines, -6 lines 0 comments Download
M juju/providers/local/files.py View 3 chunks +3 lines, -4 lines 0 comments Download
M juju/providers/local/tests/test_agent.py View 1 chunk +1 line, -2 lines 0 comments Download
M juju/providers/local/tests/test_container.py View 1 chunk +1 line, -0 lines 0 comments Download
M juju/providers/local/tests/test_files.py View 2 chunks +3 lines, -2 lines 0 comments Download
M juju/providers/openstack/tests/test_bootstrap.py View 4 chunks +4 lines, -8 lines 0 comments Download
M juju/providers/openstack/tests/test_launch.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/providers/openstack/tests/test_state.py View 4 chunks +4 lines, -5 lines 0 comments Download
M juju/providers/orchestra/tests/common.py View 1 chunk +2 lines, -1 line 0 comments Download
M juju/providers/orchestra/tests/test_bootstrap.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/providers/orchestra/tests/test_findzookeepers.py View 1 chunk +1 line, -2 lines 0 comments Download
M juju/providers/orchestra/tests/test_state.py View 1 chunk +1 line, -1 line 0 comments Download
M juju/state/charm.py View 4 chunks +4 lines, -4 lines 0 comments Download
M juju/state/environment.py View 5 chunks +7 lines, -6 lines 0 comments Download
M juju/state/hook.py View 1 chunk +1 line, -2 lines 0 comments Download
M juju/state/machine.py View 2 chunks +2 lines, -2 lines 0 comments Download
M juju/state/relation.py View 7 chunks +8 lines, -8 lines 0 comments Download
M juju/state/security.py View 6 chunks +6 lines, -5 lines 0 comments Download
M juju/state/service.py View 15 chunks +24 lines, -21 lines 0 comments Download
M juju/state/tests/test_charm.py View 3 chunks +3 lines, -2 lines 0 comments Download
M juju/state/tests/test_environment.py View 6 chunks +9 lines, -7 lines 0 comments Download
M juju/state/tests/test_hook.py View 16 chunks +19 lines, -20 lines 0 comments Download
M juju/state/tests/test_machine.py View 4 chunks +5 lines, -6 lines 0 comments Download
M juju/state/tests/test_relation.py View 7 chunks +12 lines, -12 lines 0 comments Download
M juju/state/tests/test_security.py View 5 chunks +4 lines, -4 lines 0 comments Download
M juju/state/tests/test_service.py View 11 chunks +12 lines, -12 lines 0 comments Download
M juju/state/tests/test_topology.py View 3 chunks +3 lines, -4 lines 0 comments Download
M juju/state/tests/test_utils.py View 5 chunks +10 lines, -8 lines 0 comments Download
M juju/state/topology.py View 3 chunks +4 lines, -4 lines 0 comments Download
M juju/state/utils.py View 4 chunks +5 lines, -4 lines 0 comments Download
M juju/unit/lifecycle.py View 4 chunks +3 lines, -3 lines 0 comments Download
M juju/unit/tests/test_lifecycle.py View 3 chunks +3 lines, -2 lines 0 comments Download
M juju/unit/tests/test_workflow.py View 3 chunks +5 lines, -5 lines 0 comments Download
M juju/unit/workflow.py View 6 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 4
hazmat
Please take a look.
11 years, 7 months ago (2012-09-10 03:41:21 UTC) #1
gz
Looks like a good improvement, I like that this also sorts out the confusion over ...
11 years, 7 months ago (2012-09-10 15:01:54 UTC) #2
hazmat
Please take a look.
11 years, 7 months ago (2012-09-14 15:34:27 UTC) #3
jimbaker
11 years, 7 months ago (2012-09-14 16:03:36 UTC) #4
+1, LGTM, nice speedup and a clean transition to the C extensions. Just need to
take care of the two trivials where CSafeLoader/CSafeDumper is used instead of
the equivalent juju.lib.serializer wrappers.

https://codereview.appspot.com/6493100/diff/5002/juju/environment/config.py
File juju/environment/config.py (right):

https://codereview.appspot.com/6493100/diff/5002/juju/environment/config.py#n...
juju/environment/config.py:178: config = yaml.load(content,
Loader=yaml.CSafeLoader)
Use juju.lib.serializer.load instead

https://codereview.appspot.com/6493100/diff/5002/juju/environment/config.py#n...
juju/environment/config.py:313: return yaml.dump(config,
Dumper=yaml.CSafeDumper)
Use juju.lib.serializer.dump instead
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b