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

chat.freenode.net #tryton log beginning Thu Sep 23 00:00:01 CEST 2010
-!- sharoon(~sharoon@92.25.128.16) has joined #tryton01:08
-!- ikks(~ikks@190.158.120.185) has joined #tryton03:19
-!- yangoon(~mathiasb@p549F6FD7.dip.t-dialin.net) has joined #tryton05:18
-!- mfladischer(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton07:40
-!- Timitos(~kp@88.217.184.172) has joined #tryton07:53
-!- Timitos(~kp@88.217.184.172) has left #tryton07:53
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:15
-!- sharoon(~sharoon@92.26.136.160) has joined #tryton08:15
-!- eLBati(~elbati@93.37.65.31) has joined #tryton08:32
-!- vladimir(~vladimir@213.151.246.136) has joined #tryton08:43
-!- fladi_(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton08:46
-!- enlightx(~enlightx@dynamic-adsl-94-34-180-143.clienti.tiscali.it) has joined #tryton09:16
-!- cedk(~ced@ced.homedns.org) has joined #tryton09:29
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton09:29
-!- bechamel(~user@chimie-prtx11.scf.fundp.ac.be) has joined #tryton09:43
-!- mfladischer(~fladische@2001:470:1f0b:11df:943e:37ff:fe75:aa0e) has joined #tryton09:53
-!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton09:56
-!- vladimir_(~vladimir@213.151.246.136) has joined #tryton10:00
-!- svaksha(~svaksha@unaffiliated/svaksha) has joined #tryton11:10
-!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton11:47
cedksharoon: you pinged me yesterday11:51
sharooncedk: yes, it was about the read API performance improvement11:51
sharooncedk: one min11:52
sharooncedk: looking at the whole data, we cannot use namedtuples because they cannot be pickled11:53
sharooncedk: so i have built a custom datastructure subclassing list11:54
sharooncedk: it is faster than list of dict and occupies much lesser space11:54
cedksharoon: what is the issue with pickle?11:57
sharooncedk: the pickle protocol needs the class/object to first create an instance and then set its state11:58
sharooncedk: 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 ours11:59
sharooncedk: so pickling on server side and then unpickling on client side is impossible11:59
cedksharoon: just pass a tuple12:02
bechamelcedk: how the client will re-map each tuple position with a field name ?12:03
sharooncedk: the __reduce__ method for the new pickle protocol is not capable of doing it too, i already checked that12:03
cedkbechamel: it is the order of the field readed12:04
bechamelsharoon: to pickle namedtuple, I have found this: http://docs.activestate.com/activepython/3.1/python/library/pickle.html#persistence-of-external-objects12:10
-!- lem0na(~lem0na@84.40.71.19) has joined #tryton12:19
sharoonbechamel: thanks, will try but we still have quite a few issues to resolve... like the _ prefix in _datetime12:22
sharooncedk: bechamel: will put forward both the solutions12:23
-!- eLBati(~elbati@94.160.114.155) has joined #tryton13:08
-!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton13:21
-!- vladimir_(~vladimir@213.151.246.136) has joined #tryton13:39
-!- eLBati(~elbati@93.37.66.199) has joined #tryton14:53
cedksharoon: I still don't understand why namedtuple could not work (except for '_')15:37
sharooncedk: i got pickled in my test code because both name of element and the name of namedtuuple is same + its a global in known namespace15:39
sharooncedk: it wont pickle in a different thread/file15:39
cedksharoon: you should pickle in list of tuple15:39
sharooncedk: which means a custom pickler15:41
cedksharoon: yes15:41
sharooncedk: i will try and update here again15:44
-!- digitalsatori(~tony@116.233.250.229) has joined #tryton15:44
sharooncedk: i am sure it will be slower because we have to subclass python pickle, not cpickle15:45
cedksharoon: in fact, I think this become too complicated15:49
cedksharoon: I'm thinking that we should just use list of tuple15:50
sharooncedk: ideal according to me15:50
cedksharoon: it is free to the reader to use or not namedtuple15:50
sharooncedk: exactly15:50
sharooncedk: only problem is where read method has been overwritten15:51
cedksharoon: 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 it15:51
sharooncedk: also i think the gzip_threshold is too low15:53
sharooncedk: gzip seems to be very slow, esp for small requsts?15:53
cedksharoon: we don't zip small request15:55
-!- pepeu(~manuel@201.155.193.192) has joined #tryton15:55
sharooncedk: but 1400 seems to be too low?15:56
-!- paepke(~paepke@p4FEB73ED.dip.t-dialin.net) has joined #tryton15:57
sharooncedk: coming back to the discussion about read method, i suggest that we go for list of tuples, improve the performance there15:58
cedksharoon: 1400 is common MTU15:59
cedksharoon: agree, normally read is only use internaly in trytond/model and in client15:59
sharooncedk: 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?16:00
cedksharoon: best is to use namedtuple :-)16:01
sharooncedk: this could be easily done from a list of tuple thats returned16:01
cedksharoon: with a map16:01
cedksharoon: like in the example http://docs.python.org/dev/library/collections.html#collections.namedtuple16:02
sharooncedk: i understand you like named tuples ;) BTW, there could be one last thing to do, that is using __getnewargs__16:02
cedksharoon: don't know about getnewargs16:02
sharooncedk: the thought is, using __reduce__ for pickling and returning namedtuple itself as a class instance16:03
sharooncedk: let me check16:03
sharooncedk: i will tryt and get back16:04
sharooncedk: ping16:35
cedksharoon: pong16:36
sharooncedk: namedtuples cannot be implemented because there would be absolutely no way of regenerating them on the client side :(16:37
cedksharoon: no problem let's go with list of tuples16:38
sharooncedk: ok16:38
cedksharoon: I think you did not understand me16:38
cedkI think that a programmer inside tryton could get namedtuple from read if he wants16:38
cedkit will be very simple16:38
sharooncedk: that is simple16:39
cedksharoon: so let's go with list of tuple16:40
cedksharoon: it will be great to have it for 1.816:40
sharooncedk: yep16:40
-!- gremly(~gremly@190.147.153.67) has joined #tryton16:42
sharooncedk: we need to get easy_install trytond=dev to get to work!16:47
-!- digitalsatori(~tony@116.233.250.229) has joined #tryton17:10
-!- sharoon(~sharoon@78.144.208.171) has joined #tryton17:43
-!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton17:46
cedksharoon: don't understand18:05
sharooncedk: can we have a sudo easy_install trytond=dev to install the development version?18:06
cedksharoon: is it not working?18:09
cedksharoon: fill an issue18:09
sharooncedk: sure18:09
-!- chrue(~chrue@dialin-65225.ewetel.net) has joined #tryton18:28
-!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton19:01
-!- eLBati(~elbati@94.162.49.166) has joined #tryton19:38
-!- enlightx(~enlightx@dynamic-adsl-94-34-180-143.clienti.tiscali.it) has joined #tryton19:44
-!- pheller(~pheller@c1fw230.constantcontact.com) has joined #tryton20:01
-!- pheller_(~pheller@c1fw235.constantcontact.com) has joined #tryton20:03
-!- pheller__(~pheller@c1fw230.constantcontact.com) has joined #tryton20:04
-!- fares(~fares@41.225.215.248) has joined #tryton20:05
-!- sharkcz(~sharkcz@2001:15c0:6747:160::6) has joined #tryton20:20
-!- pheller(~pheller@c1fw235.constantcontact.com) has joined #tryton20:25
-!- eLBati(~elbati@94.160.120.209) has joined #tryton21:17
-!- pheller_(~pheller@c1fw230.constantcontact.com) has joined #tryton21:59
-!- fares(~fares@41.225.215.248) has joined #tryton22:45
-!- fares(~fares@41.225.215.248) has joined #tryton22:45
-!- sharoon(~sharoon@78.144.208.171) has joined #tryton23:25
-!- pheller(~pheller@2002:ad30:d8c3:0:fa1e:dfff:fee6:aabf) has joined #tryton23:32

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!