Trac slowness diagnosis

Jon Nettleton jon.nettleton at gmail.com
Thu Mar 29 16:47:48 EDT 2012


On Thu, Mar 29, 2012 at 9:22 PM, Martin Langhoff
<martin.langhoff at gmail.com> wrote:
> On Thu, Mar 29, 2012 at 2:46 PM, Martin Langhoff
> <martin.langhoff at gmail.com> wrote:
>> On Thu, Mar 29, 2012 at 1:52 PM, Daniel Drake <dsd at laptop.org> wrote:
>>> Through some profiling I found that an inefficient trac design causes
>>> about 17,000 identical SQL queries to be executed during each page
>>> load, related to the number of users in the system (we have about
>>> 5.5k).
>
> BTW, when you are dealing with this kind of SQL abuse, every little
> thing that lowers your latency helps alleviate the pain:
>
>  - have the DB on the same host
>  - ensure the python or php runtime connects to the DB via a unix socket
>  - shooting the programmer^W^W^Wseparating to a different DB instance

Another option could be to add some javascript to the page that uses
ajax to query the users only when the drop down menu is initiated.
This would make general page load time fast and only when changing
ticket ownership would we get the big query hit.

 -Jon



More information about the Devel mailing list