Team Chat Logs

July 10, 2010

2010 6
Mo Tu We Th Fr Sa Su
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

[02:40:44.262419]<ychoucha>hello evrybody
[02:40:47.628669]<ychoucha>how are u
[02:40:56.790129]<ychoucha>i have a question about trac+svn install
[02:41:20.517433]<ychoucha>i have installed a svn+trac on a ubuntu 10.4 server but i can't connect on the svn :'(
[02:41:33.868614]<ychoucha>so i m using this how to : http://anantgarg.com/2009/03/25/subversion-trac-multiple-projects/
[02:41:49.782365]<ychoucha>when i m trying to connect on the svn , i have connection refused by server
[03:02:34.934480]<ychoucha>in fact i have this error : Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
[03:02:39.082995]<ychoucha>when i commit
[03:02:39.976265]<ychoucha>:'(
[03:13:31.177465]<slam>ychoucha: chown -R www-data:www-data /path/to/your/svn/repos/
[03:14:19.249451]<slam>ychoucha: all svn must be owned by the apache user, which is www-data in debian by default (and in $buntu, too i guess)
[03:16:14.077143]<slam>ychoucha: the way the howto you linked is not recommendable, by the way
[03:17:54.927937]<ychoucha>slam, why??
[03:18:38.817784]<slam>ychoucha: permission handling in this perl script is not ok
[03:18:58.313448]<slam>ychoucha: as you experienced already
[03:48:55.511960]<ychoucha>slam, he is only this the problem ? whith this method, because
[03:49:03.628079]<ychoucha>for me he is one trying and work
[03:56:36.216873]<evil_twin>t.e.o: Changeset [9949]: SpamFilter: fix #9409 - unicode issues in headers - <http://trac.edgewall.org/changeset/9949> - dstoecker
[03:59:14.237864]<ychoucha>slam, i make what u says but same error message
[03:59:22.082872]<ychoucha>Server sent unexpected return value (403 Forbidden) in response to MKACTIVITY
[04:01:37.258998]<evil_twin>t.e.o: Ticket #9409 (Spamfilter: Encoding exceptions when there is invalid utf-8 data in the ...) closed - <http://trac.edgewall.org/ticket/9409#comment:7> - dstoecker
[04:16:20.128106]<ychoucha>in fact it's my fautlt i mforget to add user on the svnauth files
[04:16:27.495005]<ychoucha>so goosds works svn and trac
[04:16:30.072066]<ychoucha>so happy
[04:16:39.160721]<ychoucha>now i can change the language interface to french ?
[04:16:41.615103]<ychoucha>please
[04:17:01.524957]<slam>did you use trac 0.12?
[04:17:59.743189]<slam>you will need the 0.12 svn version in order to have french interface
[04:19:35.099592]<slam>it will actually give every user the inferface language of choice
[04:22:30.916958]<ychoucha>ys trac 0.12
[04:23:10.147003]<ychoucha>slam, in preference i have no option for language
[04:24:18.406273]<slam>ychoucha: babel is installled?
[04:24:39.879090]<slam>you need babel version >= 0.9.5
[04:24:43.746352]<ychoucha>babel ?
[04:25:08.711851]<ychoucha>i hope it's not difficult to install
[04:25:38.229579]<slam>first install babel, then trac
[04:26:22.317059]<slam>ychoucha: sudo easy_install Babel
[04:27:13.568087]<slam>ychoucha: pls refer to the release notes, as they describe all that in detail, see also the docu http://trac.edgewall.org/wiki/TracInstall#InstallingTrac
[04:29:55.090548]<ychoucha>ok
[04:30:02.823122]<ychoucha>Genchi is for what ?
[04:30:04.448060]<ychoucha>please ?
[04:41:42.955777]<ychoucha>i can found on the doc where he talking of multi lang
[05:59:46.077254]<ychoucha>im trying thissudo easy_install http://ftp.edgewall.com/pub/trac/Trac-0.12.tar.gz compile_catalog -f
[05:59:55.246498]<ychoucha>but no work how to install catalog please
[06:00:31.285709]<ychoucha>i have this error :-> No local packages or download links found for compile-catalog
[06:00:31.449577]<ychoucha>error: Could not find suitable distribution for Requirement.parse('compile-catalog')
[06:02:55.865677]<ychoucha>sorry but i can t understand how to active the french language
[06:06:44.986108]<ras0ir>ychoucha: extract the tarball, then do python setup.py compile_catalog -f
[06:25:39.630598]<ychoucha>error: Couldn't find a setup script in /home/noroot/Trac-0.12/setup.py
[06:27:33.817301]<ychoucha>noroot@serveurNexuos:~/Trac-0.12$ sudo easy_install setup.py compile_catalog -f
[06:27:33.979917]<ychoucha>install_dir /usr/local/lib/python2.6/dist-packages/
[06:27:34.142308]<ychoucha>Processing setup.py
[06:27:34.163502]<ychoucha>error: Couldn't find a setup script in /home/noroot/Trac-0.12/setup.py
[07:34:40.343846]<ychoucha>thanks evryone
[07:34:47.584012]<ychoucha>i like trac he is very good
[07:48:53.906848]<ychoucha>hello, the last question promise
[07:49:35.069813]<ychoucha>i want make saved of my importante directory, and if my serveur crashed i can reinstal only trac, and get my data
[07:49:45.436095]<ychoucha>so i juste need to save the /sv and trac ?
[08:49:48.070709]<zooko>Folks: when you click on this 9 MB attachment, trac goes into 100% cpu for a few minutes: http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1023
[08:50:00.816151]<zooko>It isn't the pygments rendered -- that takes only 4.6s when I try it by itself.
[08:50:09.035939]<zooko>It isn't querying the sql database -- that takes only microseconds.
[08:50:12.244830]<zooko>What is it doing?
[09:51:11.757503]<zooko>Aha, found it.
[09:51:16.453735]<zooko>2010-07-10 10:03:15,523 Trac[api] DEBUG: xxx 1 about to <bound method Mimeview._render_source of <trac.mimeview.api.Mimeview object at 0x8da0a6c>>, now: 1278781395.52, elapsed: 0.603249073029
[09:51:28.955152]<zooko>I added debug prints, and it turns out that calling self._render_source takes several minutes of 100% CPU.
[09:51:34.818412]<zooko>now investigating further
[10:00:42.758219]<zooko>Okay the problem is in
[10:02:16.739957]<zooko>_body_rows() in
[10:02:21.441169]<zooko>_render_source()
[10:02:30.193507]<zooko>_body_rows() gets called a lot of times, and each time it takes about
[10:02:44.125679]<zooko>half a millisecond
[10:03:01.156882]<zooko>Sorry, not that it gets called a lot of times, but it yields a lot of times.
[10:03:45.884174]<zooko>Hm, now I don't know enough about trac rendering to know how to proceed.
[10:03:50.507013]<zooko>Is there a way to optimize this?
[10:05:34.346912]<coderanger>zooko: Well there is a max preview size to prevent this from happening
[10:05:39.960234]<coderanger>but thats not really what you are after
[10:05:52.898881]<zooko>Yeah, I could set that as a stop-gap measure.
[10:06:12.967371]<zooko>But I wonder if there is some good hack that would make this go from hundreds of seconds of max CPU down to a couple of seconds. :-)
[10:06:30.108368]<zooko>Make that 88seconds of max CPU
[10:06:35.480401]<zooko>down to a couple of seconds. :-)
[10:08:16.063010]<zooko>What does tag.tbody(_body_rows()) do with its argument?
[10:08:22.277460]*zooko looks for "def tbody("
[10:08:36.823546]<zooko>Hm, not in trac codebase?
[10:08:41.606251]<zooko>genshi
[10:09:19.277218]<zooko>I have genshi 0.6
[10:09:23.242287]<coderanger>tag is the genshi builder object
[10:09:43.771848]<coderanger>all it does is construct a tree in memory
[10:09:49.221517]<zooko>So tbody() is calling next() on its argument about... 100,000 times I think.
[10:09:58.273814]<zooko>and each call is taking about 500 microseconds
[10:10:53.919362]<coderanger>yes, well if there are 100k lines in the file that sounds correct
[10:10:58.026722]<zooko>Hm, where's the source code for "tag.tbody()".
[10:11:01.592611]<zooko>coderanger: yeah.
[10:11:02.790959]<zooko>Hm.
[10:11:17.019586]<zooko>would it be somewhere in genshi/core.py ?
[10:11:17.759830]<coderanger>zooko: That isn't a real function, tag is a dynamic builder
[10:11:24.108778]<coderanger>genshi/builder.py
[10:11:31.558355]<zooko>Thanks.
[10:11:44.520215]<coderanger>any attr on tag become a builder function for that element name
[10:12:02.167393]<coderanger>hence things like tag.a('Label', href='/foo')
[10:12:10.439175]<coderanger>its just a pythony way to express HTML
[10:12:26.095345]<coderanger>and, more specifically, convert them to genshi event streams
[10:12:29.320310]<zooko>So what code is it that accepted the reference ot the _body_rows() return val and then called "next()" on it 100,000 times?
[10:12:37.394750]<zooko>I'm looking in builder.py
[10:14:27.553958]<zooko>I wonder if it would help to replace Fragment.children = [] with Fragment.children = collections.deque().
[10:14:40.949254]<coderanger>okay, so _body_rows() returns an iterable of Element()s
[10:15:21.071740]<coderanger>Fragment.__call__(self, *args)
[10:15:27.805080]<coderanger>That will expand the generator
[10:15:41.671325]<coderanger>Why would you think a deque would be faster?
[10:15:50.257792]<coderanger>Iteration isn't the problem
[10:16:44.808564]<coderanger>its just the renderer thats slow probably
[10:16:58.598564]<zooko>So it currently takes about 500 microseconds per call.
[10:17:02.692109]<zooko>Think we could optimize that signfiicantly ?
[10:17:07.838625]<zooko>adding more timings of the parts of it...
[10:17:14.593518]<coderanger>doubtful, thats pretty fast ....
[10:17:20.354001]<zooko>I thought maybe it was accumulating a large number of children in that list
[10:17:33.614567]<zooko>and appending to a deque is faster than appending to a list if you do it a lot of times.
[10:18:24.637435]<coderanger>how much time is actually spent inside _body_rows as a fraction of the total
[10:18:59.120498]<zooko>good question
[10:23:20.017825]<zooko>Hm, yeah the entire body of the for loop takes 1 ms
[10:23:33.049617]<coderanger>which loop?
[10:23:41.175934]<zooko> for idx, line in enumerate(_group_lines(stream)):
[10:23:43.988115]<zooko>in def _body_rows():
[10:23:50.235509]<zooko>so each iteration takes 1 ms
[10:24:00.291691]<zooko>or maybe 1/2 ms when I don't have all these expensive debugprints inside it. :-)
[10:24:16.650133]<zooko>But the overall time to iterate over *all* elements and yield them all is 217 seconds
[10:24:22.514917]<zooko>with all these expensive debugprints
[10:24:24.591768]<zooko>or 88 seconds without
[10:24:42.976758]<zooko>So I guess I give up and reduce the max render size significantly. :-)
[10:25:03.005522]<coderanger>You can try using a deque, but then iteration gets slower while appending gets faster
[10:25:36.501435]<coderanger>really what you want to do is to allocate the right number of slots in the array all at once
[10:25:36.664891]<zooko>Well, might as well try it while I'm here.
[10:25:43.123706]<coderanger>but Python doesn't really let you do that
[10:26:21.789804]<coderanger>I wonder how much of that 1ms is spent in heap operations
[10:27:10.275755]<zooko>You can [None]*NUMSLOTS
[10:27:38.034461]<zooko>children=[None]*NUMSLOTS
[10:27:40.889899]<zooko>index = 0
[10:27:49.028911]<zooko>def append(self, x):
[10:27:53.828437]<zooko> self.children[index] = x
[10:27:56.733003]<zooko> self.index += 1
[10:28:01.720770]<coderanger>eh, thats not worth the reduction in simplicity and readability
[10:28:12.304044]<zooko>Are you sure? I suspect that you're right, but it might be worth trying.
[10:28:18.172960]<zooko>But I don't know if we know NUMSLOTS up front.
[10:28:38.982397]<coderanger>Yes, that code isn't something I would want to see in something :-P
[10:32:13.227006]<coderanger>coloring a 100k line file is just not going to work well IMO
[10:35:17.217549]*zooko nods
[10:36:37.526564]*coderanger goes back to Mass Effect
[10:37:53.853901]<zooko>:-)
[10:38:00.968441]<zooko>I'll let you know what I find.
[12:48:10.240582]<evil_twin>t.e.o: Ticket #9409 (Spamfilter: Encoding exceptions when there is invalid utf-8 data in the ...) updated - <http://trac.edgewall.org/ticket/9409#comment:8> - Matthijs Kooijman <matthijs@…>
[14:30:25.210708]<prologic>Q: Can you pass functions into a genshi context ? Or can you import functions into a template's context from within the template ?
[14:30:58.479203]<coderanger>Yes, you can pass any python object to genshi
[14:32:18.055140]<prologic>hmm
[14:32:26.556438]<prologic>is this true of 0.5.x of genshi ?
[14:32:36.508225]<prologic>cause it keeps complaining about a Lookuperror
[14:32:57.551509]<prologic>and it's just like any other variable right ? references with a $... or ${...}
[14:35:15.631601]<prologic>nevermind I got it - my bad :)
[15:48:40.629010]<evil_twin>t.e.o: Ticket #9494 ([PATCH] $ticket_props doesn't wrap long field values in notification ...) created - <http://trac.edgewall.org/ticket/9494> - Andrew C Martin <andrew.c.martin@…>
[15:48:45.629555]<evil_twin>t.e.o: ticket_props_formatting_1.png attached to Ticket #9494 - <http://trac.edgewall.org/attachment/ticket/9494/ticket_props_formatting_1.png> - Andrew C Martin <andrew.c.martin@…>
[15:48:50.629327]<evil_twin>t.e.o: ticket_props_formatting.patch attached to Ticket #9494 - <http://trac.edgewall.org/attachment/ticket/9494/ticket_props_formatting.patch> - Andrew C Martin <andrew.c.martin@…>
[15:48:55.628469]<evil_twin>t.e.o: ticket_props_formatting_2.png attached to Ticket #9494 - <http://trac.edgewall.org/attachment/ticket/9494/ticket_props_formatting_2.png> - Andrew C Martin <andrew.c.martin@…>
[17:27:55.305581]<zooko>folks, what do you make of this: http://codepad.org/eM6ufbqx
[17:28:06.471774]<zooko>Internal Server Error
[17:28:11.210819]<zooko> raise RuntimeError("No Content-Length header set")
[17:28:11.484251]<zooko>RuntimeError: No Content-Length header set
[18:46:23.194040]<osimons>zooko: the launchpad/auth.py stuff seems to write a direct response without setting a content-length header which is a required header in http - and trac only recently started to trap this error (from 0.12)
[18:48:37.715413]<osimons>introduced in http://trac.edgewall.org/changeset/8609
[19:28:33.675093]<prologic>coderanger, hi :) thought I'd share with you what I've been working (while I remember) http://prologic.no-ip.org:8000/ (local copy)
[19:29:09.041144]<coderanger>nice
[19:29:46.028948]<prologic>yeah now I need to write more wiki pages on it's features and cos
[19:29:49.460747]<prologic>docs*
[19:52:14.629376]<gusg>I'm kind of confused about the trac installation instructions. I used the Windows installer and it seems like it just made a folder "trac" under site-packages (and other folders for other dependencies). Where can I find tracd or trac-admin?
[19:54:47.926840]<coderanger>gusg: C:\Python2?\Scripts usually
[19:54:56.182778]<coderanger>assuming you put your python in the normal spot
[19:55:07.918208]<coderanger>ActivePython or cygwin Python might be different too
[19:59:05.294235]<gusg>oh great, thanks. I had no idea to look here.