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

Remove extension from identifiable is synchronous #488

Open
antoinebhs opened this issue Dec 9, 2024 · 0 comments
Open

Remove extension from identifiable is synchronous #488

antoinebhs opened this issue Dec 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@antoinebhs
Copy link
Collaborator

Describe the current behavior

When calling identifiable.removeExtension(Extension.class), the server is called synchronously on each call.
For example, in this code:

        try (NetworkStoreService service = createNetworkStoreService(randomServerPort)) {
            Network network = service.getNetwork(service.getNetworkIds().keySet().iterator().next());
            Generator gen = network.getGenerator("GEN");
            gen.removeExtension(ActivePowerControl.class); // calls the server to remove the extension from the network 
            service.flush(network);
        }

This is bad for performance, if we remove extensions of a batch of identifiables for example.

Describe the expected behavior

We should buffer the removal of extensions similarly to what is done when updating/removing identifiables (see implementation of buffered network store client).
When removing the extensions on a batch of identifiables, the removal should be done in one request.

Describe the steps

No response

Environment

No response

Relevant Log Output

No response

Extra Information

No response

@antoinebhs antoinebhs added the bug Something isn't working label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant