Fix/#2790/fix algorithm caching in optcahed #2812
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closed: #2790
What's done:
The caching algorithm was fixed: now last modifications time of cached file must be later or equal than last modifications time of program file.
The caching process can be faster if the xml file is not read. A task was added so that the file name is not taken from the file attributes.
PR-Codex overview
This PR focuses on optimizing the caching mechanism in the
OptCached
class. It includes the following changes:OptCached
class to use the path of the XML program instead of the XML object itself.apply
method inOptCached
to handle the path parameter instead of the XML parameter.cached
method inOptCached
to use the path of the XML program instead of the XML object itself.contains
method inOptCached
to use the path of the XML program instead of the XML object itself.Optimization
interface to extendFunc<Path, XML>
instead ofFunction<XML, XML>
.