Performance improvements on package generation
Performance improvements on package generation

Right now, when Solidus tries to create the packages on Coordinator, it iterates over each one of the active stock locations and skip those without the requested variants in stock.

Let's suppose we have 100 different stock locations (which is my case) and the current user has 5 items on his cart. Once it tries to create the packages it triggers 500 different queries to the database.

Here I try to address this issue, iterating over just the stock locations with the requested variants in stock.

richardnuno/solidus,jordan-brough/solidus,pervino/solidus,richardnuno/solidus,Arpsara/solidus,scottcrawford03/solidus,pervino/solidus,jordan-brough/solidus,scottcrawford03/solidus,jordan-brough/solidus,richardnuno/solidus,richardnuno/solidus,forkata/solidus,scottcrawford03/solidus,Arpsara/solidus,scottcrawford03/solidus,jordan-brough/solidus,Arpsara/solidus,pervino/solidus,pervino/solidus,forkata/solidus,forkata/solidus,Arpsara/solidus,forkata/solidus