Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update entities/common.py to use CDumper #11541

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

Mab879
Copy link
Member

@Mab879 Mab879 commented Feb 2, 2024

Description:

Update ssg/entities/common.py to use CDumper.

Rationale:

Significant speed up of compile_all.py.

@Mab879 Mab879 added the Infrastructure Our content build system label Feb 2, 2024
@Mab879 Mab879 added this to the 0.1.73 milestone Feb 2, 2024
Copy link

github-actions bot commented Feb 2, 2024

Start a new ephemeral environment with changes proposed in this pull request:

Fedora Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

@@ -128,7 +133,8 @@ def derive_id_from_file_name(filename):

def dump_yaml_preferably_in_original_order(dictionary, file_object):
try:
return yaml.dump(dictionary, file_object, indent=4, sort_keys=False)
return yaml.dump(dictionary, file_object, indent=4, sort_keys=False,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement. I got a speed up about 6 seconds when building RHEL 9 content.

Can you investigate if this change can be consolidated with ssg/yaml.py?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated to import yaml_Dumper from ssg/yaml.py.

Copy link

codeclimate bot commented Feb 5, 2024

Code Climate has analyzed commit 507351e and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 66.6% (50% is the threshold).

This pull request will bring the total coverage in the repository to 58.3% (0.0% change).

View more on Code Climate.

@Mab879
Copy link
Member Author

Mab879 commented Feb 5, 2024

/packit retest-failed

@jan-cerny jan-cerny self-assigned this Feb 5, 2024
@jan-cerny jan-cerny merged commit 1dfff9b into ComplianceAsCode:master Feb 5, 2024
43 checks passed
@Mab879 Mab879 deleted the speedup_yaml_dumping branch February 5, 2024 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Our content build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants