Skip to content

Remove extension from identifiable is synchronous #488

Open
@antoinebhs

Description

@antoinebhs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions