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

The PropertyManager::Expand() method is not optimized #72

Closed
end2endzone opened this issue Oct 16, 2020 · 1 comment
Closed

The PropertyManager::Expand() method is not optimized #72

end2endzone opened this issue Oct 16, 2020 · 1 comment
Labels
code cleanup The code needs optimization enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@end2endzone
Copy link
Owner

The actual implementation is browsing through all known properties and processes a "search and replace" in the given string. This is not optimized. The algorithm is getting slower and slower as we create more properties.

The PropertyManager::Expand() method should be optimized to search for ${...} patterns inside the string and replace the content as required.

@end2endzone end2endzone added enhancement New feature or request help wanted Extra attention is needed code cleanup The code needs optimization labels Oct 16, 2020
@end2endzone end2endzone added this to the 0.6.0 milestone Dec 5, 2020
end2endzone added a commit that referenced this issue Dec 27, 2020
end2endzone added a commit that referenced this issue Dec 28, 2020
end2endzone added a commit that referenced this issue Dec 28, 2020
…ntation of PropertyManager::Expand().

Modified PropertyManager::Expand() to expand the given string until all property references are expanded.
For issue #72.
end2endzone added a commit that referenced this issue Dec 29, 2020
…o expands property references that forms a circular reference.

For issue #72.
end2endzone added a commit that referenced this issue Dec 29, 2020
For issue #72.
@end2endzone
Copy link
Owner Author

The new implementation also have a possible infinite loop issue. The code was also modified to protect the software from infinite loops when trying to expands property references that forms a circular reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup The code needs optimization enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant