-
Daniel Vrátil authored
One of the bottlenecks in the current design is the individual Item retrieval via requestItemDelivery(). The Server does a request for the first Item, then waits for the Resource to deliver before requesting the next Item and so on. This patch changes the signature of the requestItemDelivery() DBus method to support passing multiple Items (Item IDs to be specific) at once. The patch also deprecates ResourceBase::retrieveItem() in favor of a newly introduces ResourceBase::retrieveItems() overload (which takes Item::List and set of part names as arguments) allowing resource implementations to process all the requested Items in a single batch and pass them back to the Server. This should be much faster than querying the Items one by one. This change does not remove the retrieveItem() method, but only deprecates it. When Resource only implements retrieveItem() and not the new retrieveItems() then retrieveItems() will split the ResourceScheduler Task into many single-Item Tasks and will call retrieveItem() for each of them. The next step is to get rid of DBus in here and use a dedicated command bus where the Server could request the Items via the Protocol and would be handed the Items back through the bus. Once all resources are ported to the new API, the old retrieveItem() method should be removed.
81652601