No, I used DynamicViewEntity to make more complex SQL to more quickly filter
out any orders that should not be picked.  For instance in OFBiz 4.0 (and
maybe the trunk version), the picklistoptions function will (abbreviated)

select * from OrderHeader 
for each orderHeader {
    select * from OrderItemShipGroup where orderId = orderHeader.orderId
    for each orderItemShipGroup in orderItemShipGroupList {
        select * from OrderItemShipGrpInvRes where orderId =
orderItemShipGroup.orderId;
        for each orderItemShipGrpInvRes in orderItemShipGrpInvResList {
            etc....
         }
    }
}

These kind of loops can create many hits to the database and greatly slow
down the process, especially if the database tables have many records.  Our
database is now almost 8 gigs.  The PicklistOptions process yesterday took
~4 minutes for 40 pickable orders.

My code uses DynamicViewEntity to create join statements and make minimal
hits to the database--I think a total of 4 hits.  For the same 40 pickable
orders, the process ran in 2-3 seconds.  My code is missing some of the
bells and whistles that you have, but it gives a good foundation and
structure.  You will be able to add all the bells and whistles very quickly.

My company is using my code in production right now.  The user has verified
it is working correctly to this point.  Let me know if anyone is interested
in seeing the code.  I would like to contribute to the community is some
way, since I do not have time to properly develop on the trunk.
-- 
View this message in context: 
http://ofbiz.135035.n4.nabble.com/PicklistOptions-processing-time-tp2280129p2280947.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to