Naive cache implementation in case-datasource#175
Open
antoinebhs wants to merge 1 commit intomainfrom
Open
Conversation
Signed-off-by: BOUHOURS Antoine <antoine.bouhours@rte-france.com>
8 tasks
antoinebhs
commented
Dec 10, 2025
Contributor
Author
antoinebhs
left a comment
There was a problem hiding this comment.
if we GZ
=> it would be better to download the gz from case-server directly instead of downloading the plain file then GZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
What kind of change does this PR introduce?
When importing a CGMES file, we get multiples "input stream" from the case server. This downloads the requested file each time (example for a CGMES):
So we download about 8 times the complete uncompressed file which corresponds to big network exchanges. It's also a problem because using restTemplate exchange, we store the downloaded files in memory. These files can be >500mb which requests a lot of memory.
I implemented a cache to discuss the issue, this avoid excessive downloads and to store the files in memory.
The drawback is that we need big /tmp volume to store the files and we need a robust cleaning logic to avoid orphan files in /tmp.
In addition to that, we need to quantify how much memory we need to import these file using powsybl-core only.
What is the current behavior?
What is the new behavior (if this is a feature change)?
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: