Multiple Executions of dataprovider on site load

Hi There,

Vaadin Version: 14.1.17

I am facing an issue with the com.vaadin.flow.component.treegrid.TreeGrid component and an implementation of AbstractBackEndHierarchicalDataProvider

When i do an initial load of the page, the dataprovider is executed 2 times. I was expecting it is done only once.
I checked the rendering of the page (it is only done once) and the assignment of the dataprovider (only done once).

Dataprovider

public class ProviderImpl extends AbstractBackEndHierarchicalDataProvider<A, String> {

    private final FetchingService service;

    public ProviderImpl(final FetchingService FetchingService) {
        super();
        this.service = fetchingService;
    }

    @Override
    protected Stream<A> fetchChildrenFromBackEnd(final HierarchicalQuery<A, String> hierarchicalQuery) {
        if (hierarchicalQuery.getParentOptional().isPresent()) {
            return  service.byParent(hierarchicalQuery.getParentOptional().get(), hierarchicalQuery.getOffset(), hierarchicalQuery.getLimit());
        } else {
            return  service.byRoot(hierarchicalQuery.getOffset(), hierarchicalQuery.getLimit());
        }
    }

    @Override
    public int getChildCount(final HierarchicalQuery<A, String> hierarchicalQuery) {
        if (hierarchicalQuery.getParentOptional().isPresent()) {
            return service.countChilds(hierarchicalQuery.getParentOptional().get());
        } else {
            return service.countRoot();
        }
    }

    @Override
    public boolean hasChildren(final A a) {
        return a.hasChildren;
    }


}

Initialization is only done once

grid.setDataProvider(new ProviderImpl());

Can someone explain this behavior? How can this be avoided?

With Kind Regards

Stefan