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

Avoid creating transient objects when origin file is reloaded #483

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

mikkokar
Copy link
Contributor

This PR improves origins file reloading in backwards compatibility mode: No longer are transient objects being unnecessarily created.

The current origins config translator is wasteful. It creates creates routing objects for a full configuration regardless of changes. It doesn't apply all those objects whoever. When updating the database, it checks if a new object is identical to the the existing one. If so, the newly created object is simply thrown away. This approach creates unnecessary churn. A large configuration may contain hundreds of objects. It is pointless to recreate all of them if only one object actually changes.

This PR defers object creation until the database is actually being updated, therefore avoiding unnecessary object creation.

@mikkokar mikkokar merged commit a20cd70 into ExpediaGroup:master Oct 14, 2019
@mikkokar mikkokar deleted the routing-engine-improvements branch October 14, 2019 09:54
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