IRC logs of #tryton for Thursday, 2010-09-23

chat.freenode.net #tryton log beginning Thu Sep 23 00:00:01 CEST 2010
2010-09-23 01:08 -!- sharoon(~sharoon@92.25.128.16) has joined #tryton
2010-09-23 03:19 -!- ikks(~ikks@190.158.120.185) has joined #tryton
2010-09-23 05:18 -!- yangoon(~mathiasb@p549F6FD7.dip.t-dialin.net) has joined #tryton
2010-09-23 07:40 -!- mfladischer(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton
2010-09-23 07:53 -!- Timitos(~kp@88.217.184.172) has joined #tryton
2010-09-23 07:53 -!- Timitos(~kp@88.217.184.172) has left #tryton
2010-09-23 08:15 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-09-23 08:15 -!- sharoon(~sharoon@92.26.136.160) has joined #tryton
2010-09-23 08:32 -!- eLBati(~elbati@93.37.65.31) has joined #tryton
2010-09-23 08:43 -!- vladimir(~vladimir@213.151.246.136) has joined #tryton
2010-09-23 08:46 -!- fladi_(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton
2010-09-23 09:16 -!- enlightx(~enlightx@dynamic-adsl-94-34-180-143.clienti.tiscali.it) has joined #tryton
2010-09-23 09:29 -!- cedk(~ced@ced.homedns.org) has joined #tryton
2010-09-23 09:29 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-09-23 09:43 -!- bechamel(~user@chimie-prtx11.scf.fundp.ac.be) has joined #tryton
2010-09-23 09:53 -!- mfladischer(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton
2010-09-23 09:56 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2010-09-23 10:00 -!- vladimir_(~vladimir@213.151.246.136) has joined #tryton
2010-09-23 11:10 -!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton
2010-09-23 11:47 -!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton
2010-09-23 11:51 <cedk> sharoon: you pinged me yesterday
2010-09-23 11:51 <sharoon> cedk: yes, it was about the read API performance improvement
2010-09-23 11:52 <sharoon> cedk: one min
2010-09-23 11:53 <sharoon> cedk: looking at the whole data, we cannot use namedtuples because they cannot be pickled
2010-09-23 11:54 <sharoon> cedk: so i have built a custom datastructure subclassing list
2010-09-23 11:54 <sharoon> cedk: it is faster than list of dict and occupies much lesser space
2010-09-23 11:57 <cedk> sharoon: what is the issue with pickle?
2010-09-23 11:58 <sharoon> cedk: the pickle protocol needs the class/object to first create an instance and then set its state
2010-09-23 11:59 <sharoon> cedk: in the case of namedtuples, this cannot be done because it acts as a class factory and the created class has no reference in a module in applications similar to ours
2010-09-23 11:59 <sharoon> cedk: so pickling on server side and then unpickling on client side is impossible
2010-09-23 12:02 <cedk> sharoon: just pass a tuple
2010-09-23 12:03 <bechamel> cedk: how the client will re-map each tuple position with a field name ?
2010-09-23 12:03 <sharoon> cedk: the __reduce__ method for the new pickle protocol is not capable of doing it too, i already checked that
2010-09-23 12:04 <cedk> bechamel: it is the order of the field readed
2010-09-23 12:10 <bechamel> sharoon: to pickle namedtuple, I have found this: http://docs.activestate.com/activepython/3.1/python/library/pickle.html#persistence-of-external-objects
2010-09-23 12:19 -!- lem0na(~lem0na@84.40.71.19) has joined #tryton
2010-09-23 12:22 <sharoon> bechamel: thanks, will try but we still have quite a few issues to resolve... like the _ prefix in _datetime
2010-09-23 12:23 <sharoon> cedk: bechamel: will put forward both the solutions
2010-09-23 13:08 -!- eLBati(~elbati@94.160.114.155) has joined #tryton
2010-09-23 13:21 -!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton
2010-09-23 13:39 -!- vladimir_(~vladimir@213.151.246.136) has joined #tryton
2010-09-23 14:53 -!- eLBati(~elbati@93.37.66.199) has joined #tryton
2010-09-23 15:37 <cedk> sharoon: I still don't understand why namedtuple could not work (except for '_')
2010-09-23 15:39 <sharoon> cedk: i got pickled in my test code because both name of element and the name of namedtuuple is same + its a global in known namespace
2010-09-23 15:39 <sharoon> cedk: it wont pickle in a different thread/file
2010-09-23 15:39 <cedk> sharoon: you should pickle in list of tuple
2010-09-23 15:41 <sharoon> cedk: which means a custom pickler
2010-09-23 15:41 <cedk> sharoon: yes
2010-09-23 15:44 <sharoon> cedk: i will try and update here again
2010-09-23 15:44 -!- digitalsatori(~tony@116.233.250.229) has joined #tryton
2010-09-23 15:45 <sharoon> cedk: i am sure it will be slower because we have to subclass python pickle, not cpickle
2010-09-23 15:49 <cedk> sharoon: in fact, I think this become too complicated
2010-09-23 15:50 <cedk> sharoon: I'm thinking that we should just use list of tuple
2010-09-23 15:50 <sharoon> cedk: ideal according to me
2010-09-23 15:50 <cedk> sharoon: it is free to the reader to use or not namedtuple
2010-09-23 15:50 <sharoon> cedk: exactly
2010-09-23 15:51 <sharoon> cedk: only problem is where read method has been overwritten
2010-09-23 15:51 <cedk> sharoon: it would be great to use namedtuple because it is in Python base but if it bring more issues then it solves then we should leave it
2010-09-23 15:53 <sharoon> cedk: also i think the gzip_threshold is too low
2010-09-23 15:53 <sharoon> cedk: gzip seems to be very slow, esp for small requsts?
2010-09-23 15:55 <cedk> sharoon: we don't zip small request
2010-09-23 15:55 -!- pepeu(~manuel@201.155.193.192) has joined #tryton
2010-09-23 15:56 <sharoon> cedk: but 1400 seems to be too low?
2010-09-23 15:57 -!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton
2010-09-23 15:58 <sharoon> cedk: coming back to the discussion about read method, i suggest that we go for list of tuples, improve the performance there
2010-09-23 15:59 <cedk> sharoon: 1400 is common MTU
2010-09-23 15:59 <cedk> sharoon: agree, normally read is only use internaly in trytond/model and in client
2010-09-23 16:00 <sharoon> cedk: users who want to creatively use the read data for their custom apps could build dictionaries or if performance is key, build something like i built for their custom apps?
2010-09-23 16:01 <cedk> sharoon: best is to use namedtuple :-)
2010-09-23 16:01 <sharoon> cedk: this could be easily done from a list of tuple thats returned
2010-09-23 16:01 <cedk> sharoon: with a map
2010-09-23 16:02 <cedk> sharoon: like in the example http://docs.python.org/dev/library/collections.html#collections.namedtuple
2010-09-23 16:02 <sharoon> cedk: i understand you like named tuples ;) BTW, there could be one last thing to do, that is using __getnewargs__
2010-09-23 16:02 <cedk> sharoon: don't know about getnewargs
2010-09-23 16:03 <sharoon> cedk: the thought is, using __reduce__ for pickling and returning namedtuple itself as a class instance
2010-09-23 16:03 <sharoon> cedk: let me check
2010-09-23 16:04 <sharoon> cedk: i will tryt and get back
2010-09-23 16:35 <sharoon> cedk: ping
2010-09-23 16:36 <cedk> sharoon: pong
2010-09-23 16:37 <sharoon> cedk: namedtuples cannot be implemented because there would be absolutely no way of regenerating them on the client side :(
2010-09-23 16:38 <cedk> sharoon: no problem let's go with list of tuples
2010-09-23 16:38 <sharoon> cedk: ok
2010-09-23 16:38 <cedk> sharoon: I think you did not understand me
2010-09-23 16:38 <cedk> I think that a programmer inside tryton could get namedtuple from read if he wants
2010-09-23 16:38 <cedk> it will be very simple
2010-09-23 16:39 <sharoon> cedk: that is simple
2010-09-23 16:40 <cedk> sharoon: so let's go with list of tuple
2010-09-23 16:40 <cedk> sharoon: it will be great to have it for 1.8
2010-09-23 16:40 <sharoon> cedk: yep
2010-09-23 16:42 -!- gremly(~gremly@190.147.153.67) has joined #tryton
2010-09-23 16:47 <sharoon> cedk: we need to get easy_install trytond=dev to get to work!
2010-09-23 17:10 -!- digitalsatori(~tony@116.233.250.229) has joined #tryton
2010-09-23 17:43 -!- sharoon(~sharoon@78.144.208.171) has joined #tryton
2010-09-23 17:46 -!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton
2010-09-23 18:05 <cedk> sharoon: don't understand
2010-09-23 18:06 <sharoon> cedk: can we have a sudo easy_install trytond=dev to install the development version?
2010-09-23 18:09 <cedk> sharoon: is it not working?
2010-09-23 18:09 <cedk> sharoon: fill an issue
2010-09-23 18:09 <sharoon> cedk: sure
2010-09-23 18:28 -!- chrue(~chrue@dialin-65225.ewetel.net) has joined #tryton
2010-09-23 19:01 -!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton
2010-09-23 19:38 -!- eLBati(~elbati@94.162.49.166) has joined #tryton
2010-09-23 19:44 -!- enlightx(~enlightx@dynamic-adsl-94-34-180-143.clienti.tiscali.it) has joined #tryton
2010-09-23 20:01 -!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton
2010-09-23 20:03 -!- pheller_(~pheller@c1fw235.constantcontact.com) has joined #tryton
2010-09-23 20:04 -!- pheller__(~pheller@c1fw230.constantcontact.com) has joined #tryton
2010-09-23 20:05 -!- fares(~fares@41.225.215.248) has joined #tryton
2010-09-23 20:20 -!- sharkcz(~sharkcz@2001:15c0:6747:160::6) has joined #tryton
2010-09-23 20:25 -!- pheller(~pheller@c1fw235.constantcontact.com) has joined #tryton
2010-09-23 21:17 -!- eLBati(~elbati@94.160.120.209) has joined #tryton
2010-09-23 21:59 -!- pheller_(~pheller@c1fw230.constantcontact.com) has joined #tryton
2010-09-23 22:45 -!- fares(~fares@41.225.215.248) has joined #tryton
2010-09-23 22:45 -!- fares(~fares@41.225.215.248) has joined #tryton
2010-09-23 23:25 -!- sharoon(~sharoon@78.144.208.171) has joined #tryton
2010-09-23 23:32 -!- pheller(~pheller@2002:ad30:d8c3:0:fa1e:dfff:fee6:aabf) has joined #tryton

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!