On 29/08/13 20:16 -0700, [email protected] wrote: > Hi, Devs > > I am using proteus with set_xmlrpc connection for access to a database with > 3200 products, and I need create a list of tuples as (code, name) inside > model data and search widget for displaying in POS Client but the problem > is this take a long time (10 minutes), so the client is very slow for > start, the code is: > > from proteus import config, Model, Wizard > > config.set_xmlrpc(url) > > _Product = Model.get('product.product') > _products = _Product.find([('active', '=', True)]) > > active_products = [] > for p in _products: > active_products.append((p.code, p.template.name)) > > using set_trytond is faster than set_xmlrpc, but obviously on remote > connections it doesn't work. > > How Can I solved this problem ?
Don't use proteus, it was not design for speed (even if some improvement will be welcome) but to behaves like the client. So for simple stufss like that why not just export to RPC a specific method and call it via XML-RPC (with or without proteus). -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgp7Xvt5JF9os.pgp
Description: PGP signature
