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

Refactor: Performance improvements #3521

Merged

Conversation

ClausHolbechArista
Copy link
Contributor

@ClausHolbechArista ClausHolbechArista commented Jan 22, 2024

Change Summary

Performance improvements in eos_designs and common schema tooling

Proposed changes

Based on cProfiling this focuses on the most time impacting areas

  • Avoid natural sorting internal data structured when not needed.
  • Move schema build to Python instead of Ansible.
  • Compile a fully resolved schema and store as "pickle" when building schemas.
  • Load schema store from fully-resolved pickles instead of YAML with $ref.
  • Adjust schema tooling to not run through resolving schemas during validation

How to test

  • No changes to molecule outputs (so conversion works as expected)
  • Runtime is better (390 devices, 12 forks):
    arista.avd.eos_cli_config_gen : Generate eos intended configuration---------------- 488.45s -> 473.17s
    arista.avd.eos_designs : Generate device configuration in structured format ------- 558.30s -> 149.62s
    arista.avd.eos_designs : Set eos_designs facts ------------------------------------ 199.58s -> 46.85s

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@ClausHolbechArista ClausHolbechArista marked this pull request as draft January 22, 2024 13:32
@github-actions github-actions bot added type: documentation Improvements or additions to documentation role: eos_cli_config_gen issue related to eos_cli_config_gen role state: Documentation role Updated type: Python filters role: eos_designs issue related to eos_designs role labels Jan 22, 2024
@ClausHolbechArista ClausHolbechArista marked this pull request as ready for review January 23, 2024 07:03
ClausHolbechArista and others added 2 commits January 26, 2024 15:38
…mplate.py

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
…tojsonschemaconverter.py

Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
Copy link
Contributor

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

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

LGTM once CI finishes
⚡ ⚡ ⚡

Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

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

LGTM, once CI completes!

@gmuloc gmuloc merged commit af960a8 into aristanetworks:devel Jan 26, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: Refactor role: eos_cli_config_gen issue related to eos_cli_config_gen role role: eos_designs issue related to eos_designs role state: Documentation role Updated type: documentation Improvements or additions to documentation type: Python filters
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants