You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the collection is not loaded, a light request to the server getting only the count
Describe the motivation
performance and less resources usage
Extra Information
Note that this would not be optimal for code like
network.getGeneratorCount() ; // load only the count from the server
network.getGenerators(); // now load all the generators
But this looks negligible compared to the improvement of not loading everything in cases were you only want the count. And if it really matter, code can be rewrite to call .size() directly on the getGenerators() instead of calling getGeneratorCount()
The text was updated successfully, but these errors were encountered:
Describe the current behavior
*count methods always fetch the whole collection and then count
NetworkImpl.getXYZCount()
VoltageLevelImpl.getXYZCount()
SubstationImpl.getXYZCount()
Describe the expected behavior
if the collection is not loaded, a light request to the server getting only the count
Describe the motivation
performance and less resources usage
Extra Information
Note that this would not be optimal for code like
network.getGeneratorCount() ; // load only the count from the server
network.getGenerators(); // now load all the generators
But this looks negligible compared to the improvement of not loading everything in cases were you only want the count. And if it really matter, code can be rewrite to call .size() directly on the getGenerators() instead of calling getGeneratorCount()
The text was updated successfully, but these errors were encountered: